Apparently in the US, a lot of states have decided that it's necessary to dictate what restroom you should be using according to the genitals you happen to be born with.
Maybe this is because many of those representatives/senators are male and they fear a trans seeing their genitals when they pee.
However, females don't have that problem. Stalls solve it. There is nothing to see, women go into a stall fully dressed. They come out, fully dressed.
In fact, once many years ago, I shared a public toilet on a University campus with a guy. Definitely male, I saw him dash in. However, he was there because he needed a toilet. From the almost immediate noise/smell, he needed that quite quite badly.
As long as everyone in the restroom is in there to take care of business, I see no problem. Legislation isn't needed. Acceptance is. And more unisex restrooms.