Your sex at birth.
Not even that will work. The newest trend that is getting traction is for "theybies," newborns who are not "assigned a sex" at birth and there are plenty of moonbat doctors who will coddle this insanity in their insane parent clients.
The law will have to define the physiology and genetics which objectively indicate sex, because many doctors won't.
It will have to be defined down to the molecular level- whatever then genes say! Natural human chimerism is very very very rare!
https://en.wikipedia.org/wiki/Human_chimera