I don’t get people who say gender doesn’t exist.
Gender is a word developed by feminists in the 70s to describe the behaviours commonly associated with each sex. Like wearing a dress, or painting your nails, are feminine behaviours. But you don’t have to be a woman to do them (and doing them doesn’t make you a woman).
Feminists wanted the term “gender” back then because they wanted a way of talking about how women weren’t limited to some of the negative (patriarchal) stereotypes about women. We are not innately obsessed with being pretty, not innately less intelligent or capable, not only suitable for domestic work and childbearing etc - the word “gender” allowed feminists to talk about how masculinity and femininity are shaped by culture. It allowed them to point out that women have a lot of potential to be more than feminine stereotypes.
So while you can’t change sex, you specifically can perform the gendered behaviours associated with with the opposite sex. And obviously sometimes the line between nature (biology) and culture (gender) is unclear.
So women have had to go from arguing that they are not limited to their biological function, to now arguing that their experiences in the world are in fact shaped by their biology (and how they are treated because of their biology).
In other words, women just cannot catch a break.
I still think gender is a useful term though. Men can dress as women all they like: that’s what the word gender makes visible. They are just doing behaviours commonly associated with women.