The real world is, as usual, considerably more complex than a reductivist such as yourself would like it to be.
https://en.wikipedia.org/wiki/Sex_and_gender_distinction
Now, if your takeaway from that is "well sex and gender are the same thing, innit" then you're probably a bit of an idiot.
Just because people use "sex" and "gender" interchangeably doesn't mean that it's accurate. In the same way that most people talk about wheel nuts on their car, when 90% of the time they really mean wheel bolts. In casual conversation people know what you mean, but if you buy wheel nuts when you needed wheel bolts, well. You're going to have a bad time when it comes to wheel-fitting.
https://en.wikipedia.org/wiki/Sex_and_gender_distinction
The distinction between sex and gender differentiates sex (the anatomy of an individual's reproductive system, and secondary sex characteristics) from gender, which can refer to either social roles based on the sex of the person (gender role) or personal identification of one's own gender based on an internal awareness (gender identity).[1][2] In some circumstances, an individual's assigned sex and gender do not align, and the person may be transgender,[1] non-binary, or gender-nonconforming. In some cases, an individual may have biological sex characteristics that complicate sex assignment, and the person may be intersex.
The sex and gender distinction is not universal. In ordinary speech, sex and gender are often used interchangeably.[3][4] Some dictionaries and academic disciplines give them different definitions while others do not.
Among scientists, the term sex differences (as compared to gender differences) is typically applied to sexually dimorphic traits that are hypothesized to be evolved consequences of sexual selection.[5][6]
Now, if your takeaway from that is "well sex and gender are the same thing, innit" then you're probably a bit of an idiot.
Just because people use "sex" and "gender" interchangeably doesn't mean that it's accurate. In the same way that most people talk about wheel nuts on their car, when 90% of the time they really mean wheel bolts. In casual conversation people know what you mean, but if you buy wheel nuts when you needed wheel bolts, well. You're going to have a bad time when it comes to wheel-fitting.