It's just as easy to confuse the two concepts in the human society as it is in weakly typed programming languages.
If all genders were truly identical, there would be no point distinguishing between them in the first place.
What I think this study shows (and its not the first) is that it debunks the notion that discrimination is the only reason for any differences in gender representation. If a particular field does not have a 50/50 gender split, then that must be wholly explainable by discrimination. This study shows that this is not the case. There is a component of the unequal split that is based on personal preference. And that personal preference has a biological component. This idea is taboo.
Which is also a notion that nobody has ever argued but suits polarized demagoguery.
For representation, if you increase the scope of the notion from "discrimination is the only reason" to "discrimination and unconscious social biases are the only reason", it certainly applies.
If they could just change it, I assure you so many people that suffer dysphoria would snap their fingers and cure themselves.
.
And it's gender roles that are a social construct, not gender identity. It's unfortunate that both those terms are referred to as "gender", but please try not to spread the confusion.
If we just look at sex rather than gender, I can count five sexual options that mammalian biology likes to throw darts at;
1 - male genitalia
2 - female genitalia
3 - male and female genitalia
4 - no genitalia
5 - make shit up wholesale
Now, only the first two generally go on to produce offspring and the last one usually doesn't make it to birth, but nature doesn't really care for isolated categories or people's desire for simple classification systems.
When it gets to gender things are even more complicated, as some people have a very strong impulse towards a category that they essentially have very little control over, while other people feel as though they can chose from a menu. And both can be correct.
My thoughts on gender and social construct stuff likely wouldn't fit with whatever is politically correct and I've been gratuitously burned enough, thank you, so I don't care to go there at all this time around.
In a nutshell, I'm saying your 5th scientific category of "make shit up" would be more accurate for a broader subset than your framing would tend to suggest.
It's a little like the concept of Newtonian gravity, which was made obsolete by Einstein's Theory of Relativity, yet we still use mathematical formula based on that for calculations here on earth because it's sufficient to that scenario and less work. Theory of Relativity calculations matter for interplanetary travel. Using Newtonian formulae would get you very off course in a basically deadly fashion.
For many situations, male and female are broadly sufficient mental models. Where they aren't, they can be actively harmful. But the fact that higher levels of accuracy are frequently not needed doesn't mean they are actually true anymore than using Newtonian math here on earth makes Newtonian physics not obsolete in a post Einstein world.
I get you, I think I may have put my point across fairly badly in that case.
I would like to add that you just can't live in a complex world without the broader models. Trying to use the accurate models for every case would be just overwhelming.
Sure, everyone likes to bitch about other people using the broader model for their own pet peeves, but this doesn't mean that they aren't - and have to be - ignorant in other cases.
Now we have iron spaceships and wooden small furry creatures from Alpha Centauri.
If someone was arguing that genders are identical, rather than making an argument about societal treatment of people by others, which is what the actual argument seems largely to be about, they'd be effectively arguing that gender doesn't exist.
There has been considerable and consistent outcry whenever anyone even hints at the idea that gender disparities could be due to irreconcilable gender differences, rather than disparities resulting from social pressures. Many people have been fired even for suggesting it.
So, to reply to your renark: many people in the social sciences think genders are equal at birth, and many other people think that this alleged equality should be somehow preserved by society.
Luckily, data from life sciences seems to contradict this construction.