I did this one time at a park. I was in a hurry and I walked in to this large, janky restroom that was poorly marked. Looked around and noticed there were no urinals and realized my mistake. On my way back out there was a teenage girl who had just walked in with the look of terror on her face that a man was in the women's room. I said I made a mistake and got out of there quickly.
That happened in 2010. If that happened in 2019 I'd probably be on the news and definitely all over social media.
Unless....I made up an excuse that I identify as female then I might be ok.