I'm not sure you need to create this word 'gender' to explain what you just explained very clearly.
Biological sex seems to be consistent to me. You are either male or female. There may be a very small number of people born with a condition which means that identification is not possible but this is rare.
Biological sex determines whether you are male or female, not the way you feel.
That's the philosophical position that has been held for all of history, until a few short years ago when our enlightened superiors found out it's actually the way you feel, not what's between your legs.
They also found out that there is a thing called sexuality and gender.
It's clearly a new set of beliefs about human nature. Believe it if you want but don't make the club fly the flag.
It's better to have the word "gender" or say "gender is a social construct" than for me to type out two paragraphs explaining what I mean every time, right? That's how words function, as shorthand pointers to more complex concepts. If you mean something different when you say "gender" then as long as I know what you mean then it's fine. It's only when we're both using our own definition and talking past each other that there's a problem.
Biological sex hasn't been consistent over time though, and that's very obvious if you think about it. Now people tend to point towards chromosomes as defining sex. XX is female, XY is male, and the outliers like the XXY and such are intersex or some other term. But this clearly wasn't the case in the past if you consider that chromosomes weren't identified until the 1880's, and certainly not well understood till long after. In the past people would've pointed to genitalia as being the defining characteristic of biological sex, but now we know there are all sorts of conditions that can affect that (questions like "is a eunuch a male?", or birth defects). So what we mean by biological sex today is absolutely not using the same definition as the past. Again, I don't think this is delving into much philosophy, this is pure biology we're talking about.
But if you ask me to define "male" I do it in terms of anatomy, biology, chemistry. If you ask someone "what makes you a man?" now you're likely to get answers like bravery, strength of character, being a good father or son, you open up the question to social concepts. Surely, you've heard that kind of idea talked about.
And let's say we make it less abstract again. Let's say we take what the idea of a "woman's role" is in Saudi Arabia (subservient, docile, modest, covered and so on). Now if a woman from Saudi Arabia moves to the UK where she isn't (or is far less) expected to be those things, is she no longer a woman? Of course not. It's just that "woman" is a social construct that shifts over time and culture. It's not some fixed thing that we can point to and say definitively "these are the essential characteristics of a woman or man".
It gets even more blurred than all that. Because actually, your biology
does determine how you feel about your gender. I don't know if you've heard of phantom limbs, but it's a condition in which a person loses a body part and continues to feel pain or sensitivity in it. The brain doesn't properly interpret that it's gone and still gives signals as though it's there. Now, the samples are limited for obvious reasons, but in men who lose or damage their genitals in an accident, you get extremely high rates of phantom feelings. In transgender folks who willingly undergo surgery to remove or alter their genitals you get significantly lower rates (not 0%, interestingly, but far lower). There's a lot more research like this, and it all points to the idea that our brain (there's evidence pointing to the physical structure of areas of the brain) very much dictates how we feel about our gender. Gender and sex are distinct but interwoven ideas.
I could go on, but for one, I'm not an expert, and for two, I hope I've done enough to make it clear that this isn't abstract philosophy thought up by academics thinking of new books ideas, this is where real world research and hard data is leading us.