Whichever one their parts match.
This. You can use the girls bathroom when you have girl parts – period.
How about we get rid of the mens urinals and have larger bathroom for everyone with enclosed floor to ceiling stalls? Put in those spring operated seats so men don't piss on them.
And here is a second solution – end segregated bathrooms.
Seriously, as long as we make it illegal for a man to enter a woman’s bathroom and vice versa, there is no grounds whatsoever to declare a man that wants to say he is a woman even though that is false can then ignore those standards.
Either end segregated bathrooms or use the damn bathroom that fits your sex – not your fantasies.
I would also like to point out that there really is no difference here from a ‘transgender’ man and a normal man. Transgender does NOT, by default, mean gay. Just because you have a penis but like to wear dresses and be called a woman does not mean that you are not attracted to women. Facing that reality – why would you have segregated bathrooms but make exceptions for a special group of people?