Okay, so you’re suggest it be based on chromosomes — a genetic test. But there are issues with that as well — all kinds of genetic abnormalities exist where people can be born with the opposite genitalia that their chromosomes indicate and assigned a gender at birth that corresponds to those. You’re trying really hard to fit a square peg in a round hole here — now you’re talking about categorizing people the opposite gender than they’ve known their entire lives. You’re almost toeing the eugenics line by asking for genetic tests. I know it isn’t intentional, but it might be worth pondering what that means.
In general, I would opine that the world exists in shades of grey. It is very much not a black and white question like people make it out to be.