I've had what might be called the opposite problem.
In the summer someone called security on me in Coventry city centre public loos. The complaint was that a woman had gone into the gents. I told the security guard who came in to tell me off that I was flattered and he looked a bit embarrassed. :-)
I imagine that since the UK Supreme Court ruling on the equality act (is that the right name?) many people think that it is illegal and criminal to enter the 'wrong' loo. Regardless of the actual law I wouldn't dare use the ladies in the UK now for fear of exactly the sort of action you mentioned.
However I feel that I must say that apart from that trivial incident and a few insults shouted at me from a safe distance I have had no problems in the UK or in the countries I pass through on the way to the UK from Norway. In fact many women and men have complimented me on my clothes or jewellery.
You are right that this vigilante-like behaviour is getting out of hand and that it seems to be cis women who are suffering most. There was an article on the subject in The Guardian:
https://www.theguardian.com/world/2025/aug/12/ive-been-spat-on-gender-non-conforming-women-tell-of-toilet-abuse-in-aftermath-of-supreme-court-ruling