ARG! I'm fighting a losing battle on this I know. But gender is a grammatical term.
"Sex" is biological.
There can be numerous genders (male, female, neuter).
There are only two sexes. Liberals switched the naming on purpose.