Gender used to mean the same thing as sex before faggots got involved, it was a polite way of saying sex without the scientific undertone. I prefer it that way.
But in the modern concept it's just another word for stereotypical behaviour and that varies from culture to culture and time to time making it an undefinable mess at best, so no, it's all just shifting conceptual bullshit.
The modern debate on gender is a clear example of the nominalism-realism divide and the problem of universals in action.
People who promote gender identity as something that is in flux, something that can be redefined at will, are nominalists. What they're asserting is that gender, the state of being a man or woman, is not a physical state, but a mental state, that all the behaviors, attitudes, and forms of self-presentation we traditionally associate with maleness or femaleness are products of the mind and cognition, and are therefore arbitrary and mutable. When we call someone a man or a woman, we aren't retrieving a physical fact about them, we're just engaging in a language-act with our brains that casts some arbitrary concept of gender on another person, just because they resemble that gender.
In contrast, those who are opposed to the concept of gender identity are realists. They don't see gender at all, just the physical reality of biological sex and its attendant features; intercourse, conception, childbirth, et cetera. The assumption, generally, is that the attitudes and behaviors associated with the sexes are a product of the physical reality of their bodies being different, and that their minds are subordinate to their bodies. In this view, sex is a universal attribute; it exists separately from people as something fixed and immutable in the metaphysical space and our senses merely test people against that pre-existing template.
The problem with this debate is that it's fucking unwinnable. It's not a debate about gender or sex at all. It's a debate about ontology and whether or not it's possible to have knowledge about one's environment and the objects or people in it.
This goes well beyond gender. These are two completely different frameworks for confronting reality. The nominalists are essentially asserting that knowledge of biological sex is impossible, that our senses cannot be used to retrieve facts from the environment, that we're just arbitrarily playing word games and naming different individual objects that resemble each other according to our wishes. If you pay attention a little more closely, postmodernists have applied this same exact thought process to plenty of other things, like claiming that we should "decolonize science" and put witch doctors and shamanic practices on-par with, like, Bohr and Feynman, just to make people happy.
It's the same thing. After all, if there are no objective facts and no way for our minds to access knowledge about our environment and the things in it, then everyone has their own "individual truth" and we should just pat them on the ass and give them a participation trophy no matter how stupid and counterfactual their ideas are.
People have been arguing about this exact thing for literally thousands of fucking years. It's not new.
We notice that there are different kinds of things in the world. All that exists is not identical, but rather entities are divided into categories such as living things and nonliving things, thoughts and objects, matter and energy, beautiful things, just things, red things, blue things, and a seemingly countless number more. We reference these general categories in literally every sentence we utter--we often speak not of “this color” or “that color,” but of redness and blueness; we often speak not of this animal and that animal, but of humans and dogs. In other words, we identify particular things as members of classes, each of which has many other members, and we talk about classes of things in general rather than about particular members. But how do we account for this phenomenon of organization? That we are able to categorize things, some effortlessly and without conscious thought, requires explanation. First of all, how does one come to know that two things are of the same kind at all? The obvious answer for many things is the phenomenon of resemblance. For instance, I know that two particular trees, despite not being identical, are the same kind of thing--they are both trees--because I notice a strong resemblance between them. Prior to any knowledge about DNA or other scientific markers which might rigidly distinguish things like trees, it is reasonable to think that resemblance has been the intuitive basis of categorization for most of human history.
This is also where you get Derrida and Foucault and the like, saying that knowledge is
literally power, in the sense that regimes enforce their power by artificially defining what is true and what is false.
Foucault invents the term “power-knowledge” to indicate that power and knowledge directly imply one another. He claimed that there is no power relation without a correlating constitution of a field of knowledge, nor is there any knowledge that does not presuppose and constitute power relations. From this, Foucault concluded, similar to the way Marx did, that intellectual history is nothing more than a demonstration of the ways in which the conception of truth has been used by power structures to mask the will to power that always operates just beneath the surface. Each society, and each épistémè, Foucault said, has its own régime of truth, its ‘general politics’ of discourse which it accepts and makes function as truth.
Teaching college kids shitloads of postmodern deconstructivism will inevitably lead them to embrace transgenderism. It's very simple. All you have to do is assert that our existing categories of knowledge about the world and the things in it are the products of oppressive power structures dominated by capitalist, white, male, Anglo-Saxon Protestant thinking patterns, and that "man" and "woman" are two such categories of thing, and that these arbitrary categories should be dissolved and replaced with an entire spectrum of individually self-defined genders in order to take that power of self-definition back from the ruling power structure, and so on.
In this view of the world, the mere act of someone labeling someone else is an intolerable expression of power over them. Like, if you name something, you control it. This is also why these same whack-jobs flip out about "pronouns", "triggers", and "micro-aggressions" and how "words are violence". It's because they want the power to define themselves exclusively, without anyone else exerting that same power of definition over them.