Sex = gender = male/female. People are confused because the moronic overlords of society keep pretending that extremely uncommon outcomes are the norm. For example, people can be born with both genitalia (again, EXTREMELY rare), which can cause a bit of an ethical issue as to which one should be dominant. Even though usually one is far more developed than the other, making the choice obvious. It's just people changing word definitions and pretending that they can be something that they are not.
How many intersex people are you aware that you know? Would you be prepared to call them defective to their face and would that be acceptable, polite behaviour? If you wouldn't do it in person, why do it here? I'm saying this because my partner, whom I love, does not have the genitals you describe in your question and I find it vicariously offensive.
Anyway, you're wrong. Gender is defined based on one's presumed potential relationship to physical reproduction. Because my partner was presumed to be a potentially pregnant person by the general public, she is female.