This happens already. Like many gender-non-conforming women, I've been 'challenged' in women's toilets.
It doesn't take the form of 'going up to someone in a bathroom [toilet - the facilities that do not have baths in them] and say i think you’re a man, prove you’re a woman if you want to stay here?'
It takes the form of 'Excuse me, this is the ladies!'
I deal with it by replying in a friendly tone - 'That's OK, I'm in the right place'
which resolves the issue - a second glance enables the challenger to ID me as a woman, because it's really not that difficult; she perceives my non-aggressive and friendly attitude; and she hears my voice; she recognises me as a woman.
It happens. No drama. I welcome the challenge because it is an indicator of women proactively protecting women's spaces.
Any man who has genuinely made a mistake will quickly leave.
Any man who has deliberately entered a space which he knows is designated for women only should quickly leave, but if he stays, he is 'outing' himself as a transgressor, and his actions may result in security/management, and eventually if he causes a public nuisance, the police being called to deal with him.