I have my own definition that I have shared many times on these boards
A societal stereotype snapshot of each sex.
i.e. what a man is stereotyped like in 2026 / what a woman is stereotyped like in 2026. It is a snapshot because it is continually fluid and changes over the decade / centuries - see pink is for boys -> pink is for girls, or high heels brought into Regency England for men -> stereotype for women today.
however the TRA community doesn't like it because it reinforces the fact that you can not even transition gender let alone sex.
A man who adopts all the habits of a woman (wears a skirt / long hair / lipstick / fishnet stockings / add your own stereotype!) doesn't adopt the female gender or become a woman - instead, because gender is defined observationally as a result of seeing all of society - their habits simply push the boundary of stereotype or definition of the male gender...
you are born a man / woman and can't change your biology, therefore
anything a man does defines the male gender (even if they were stereotypically habits of women) and vv. So the more a man moves away from 'male gender' (stereotypes) the more they simply redefine 'male gender' (stereotypes)
so male gender is basically a view on whatever biological men are doing
female gender is a view on whatever biological women are doing
and for both it is a vast range with some stereotypes for convenience - but a woman not meeting the stereotypes is still a woman and vv.
TLDR
Male gender is whatever is done by a biological man
Female gender is whatever is done by a biological woman
sex - immutable
gender is defined by sex, therefore gender = immutable