Actually, gender is a grammatical term that people used for humans so they wouldn’t have to use the word sex. Then it was taken over... so it is not that one’s sex determines one’s gender: it’s that either gender is not a thing or that gender and sex are the same thing.
You completely missed the point.