Al-shams is grammatically feminine.

Feminine Tāʾ in the Past Tense: Form and Agreement