The problem we've got here is that Upton is using a different system to determine sex than the rest of us. He's not talking about 'gender identity' at all. As he patronisingly said, bio sex is far to complex to be determined by a quick check for a penis or a vulva when we're born. It encompasses so many things. Primary characteristics, secondary sexual characteristics, endocrine sex, social sex (I think there may have been more). He eagerly listed them for the judge, who wrote them down.
The rest of us can use the old fashioned system if we wish but we're wrong. And if we use our system and don't respect his by agreeing with it, he has no choice but to have us punished. In fact, it goes without saying that people won't respect his system. That's why he kept a diary of what female nurses were doing in the changing room, so he'd have evidence when he inevitably needed it later.
His system, based on a method he hasn't fully explained, says that he is biologically female and he will not budge from that. And means that if a woman asks for same sex care, he's automatically included in the pool of docs who can provide that. Obviously if the woman asks him personally not to touch her vagina or bottom then he won't, but she will have to stop him at that point. Her initial request doesn't exclude him.
The only conclusion I can draw is that he's lying, or he's mentally unwell, and either way, shouldn't be in female spaces.