the government isn't just sanctioning sexual assault but mandating it
It is not assault to have someone else in the same room with anatomy you do not like.
It is assault to demand someone look explicitly.
It is assault to demand someone leave so that your sensibilities are not offended by you looking/seeing.
It is not assault to just be there assuming the reason for being there is to use the infrastructure, not star at people's bodies.
If someone is staring at your body in the locker room, by all means have them ejected, they are sexually assaulting you by leering.
But it is not assault any more than a black person standing behind a white person waiting for the ATM is a mugging.
Exposing yourself to unwilling viewers in public is assault.
Again: No one is offended by penises. I am not offended by penises. I have been married probably longer than you've been alive, I've raised sons, I've been in mixed gender group shower situations, have taken life drawing classes with naked male models. Shit I went to school in the 70's---during the streaking craze! It was definitely not possible to not see plenty of penis, even unexpectedly on my college campus. It was simply how it was and no big deal.
Unless you did not expect to see a penis next to you in the shower. That would have been startling, upsetting, possibly traumatizing depending on the circumstance. If the person with a penis is with their girlfriend, probably just considered impolite to intrusive. Some dude from the guy's floor appearing in the shower on the women's floor? Not cool and possibly threatening. Someone you'd never seen before? Definitely scary situation. Shit, there were a couple of guys I would not willingly be in an elevator with even if there were several other people in the same elevator. Alone? I got off immediately. Women learn to develop and trust their creep meters for good reason. No, creep meters are not infallible. But I spent one long, long night trying to keep one of those creepy dudes from lighting on fire my friend who had passed out. Or raping her because he was definitely interested in that. So when I say creep: it was earned.
I have been sexually assaulted/had attempts made in places where I should have been safe: At the home of extended family members. On a camping trip with my family. In a crowded dorm room. In a friend's apartment. At work--technically that was just a threat of assault by someone who was 3 times my size. At a different work place--when I was about 8 months pregnant, actually.
You know what that makes me? Lucky because nothing progressed to actual rape. And very, very, very average.
A woman would have to be blind or stupid not to be startled, at the very least to find a naked stranger with a penis next to her in the women's locker room or shower. She would not be unreasonable to be upset or frightened.
Assuming the naked person with a penis is a trans woman, the woman next to her probably would be no threat whatsoever. But how should she know that? It is NOT something a woman can safely assume! And if she reacted as the average woman would probably react: with horror or outrage, that would probably be fairly traumatizing to the transwoman. No one wants that either.
Which is why I think the only reasonable way to accommodate everyone and to allow everyone to feel safe is to have universal and mandatory individual stalls with doors for dressing and showering.