Trans people use the bathroom according to their gender identity all the time and you would never know because they “pass”.
“Trans bathroom panic” is fear-mongering nonsense based on something that largely doesn’t actually occur. That is the problem with a hypothetical issue being the basis for legislation.
It’s telling that when trans people are discussed, it’s always and only ever trans women, never trans men. Do any of these laws mention trans men; are they in the discourse at all? (Rhetorical question: they are not). There are distinct psychosexual reasons for this, but it’s mainly due to a very old fear on the part of straight men of being “tricked”. It’s still the narrative of straight men that is dominant, even if it doesn’t appear that way on the surface. Trans women are the threat; they allow for a marginalized group, a very small percentage of the population, to be thrown under the bus in the name of “protecting women”. But it’s far more cynical than that. It is not about bathrooms, it is about, as a user honestly stated above, not wanting “weirdos” in your public spaces.
I agree with everything Quackly said. If a man wants to assault a woman in a public bathroom, he does not need to pretend to be trans in order to do so. It is ultimately a separate issue.