Oxford dictionary definition of gender:
The male sex or the female sex, especially when considered with reference to social and cultural differences rather than biological ones, or one of a range of other identities that do not correspond to established ideas of male and female.
Try again.
Ur clearly saying that Sex and gender are the same thing. NOT IT'S NOT. The brain actually determines how someone behaves. If their brain is built like a male brain, despite being female, they will behave more like a male.
Yes. But do they need to stay like a girl? No, they can be Trans, genderfluid, or non-binary yet still have female anatomy. Sex is your anatomy, and gender is what you want to be perceived as.