I suppose it depends on who's definition of gender you use. Many use it, incorrectly, as a synonym for sex. I think this largely started in the early 2000s when "harassment" was being pronounced hair-ess-mint because "sex" became a dirty word. Gender was softer and more PC, despite not being the same thing. Gender is a social and/or grammatical construct. Words in many language have a gender, they don't have a sex. Sex is biological and exists with or without a culture. Gender only exists with a culture.
That said, I understand this is such a political hot button now that pretty much nobody cares what words actually mean, or even acknowledge that words have meaning. The ability to redefine words at will is a powerful propaganda advantage.