That's not discrimination or racism, that's reality. I'm not saying shoot first or discriminate by having him taken away. I'm saying be aware.
For a bathroom, I don't see it as the exact same thing. I want anyone with a penis in my bathroom not my wife's. Not only could most people with a penis easily overpower her 120lb frame, it does open the door for liars.
There was another post above that made the point: are all people with male genitalia a bunch of rapists? I'm personally spooked to even be friendly to a child I don't know, so I understand his point entirely. Or are we going to be able to walk into a woman's bathroom unrestricted? Difficult to have it both ways or exceptions for people who are mentally a woman but physically a man.
At some point societies have to make some decisions on how we're going to do things and it will always end up imperfect. I agree with you that we can do better but how to achieve that isn't clear without compromising on other factors that others feel are important.
This is the same logic used to discriminate against Muslims because we don't know that they're not terrorists.
(And, incidentally, why on earth does everyone take it for granted that a public bathroom is a place where you can easily spy on other people's genitals? The entire problem could be solved forever if builders used proper floor-to-ceiling walls, with louvered vents for ventilation. It weirds me out that nobody else thinks bathroom design is insane.)