Lock the goofy bastards in Mental Institutions and we won't have to worry about them using restrooms in public.
The shouldn't be let out in public until they are cured.
I will point out that this was the normal way of dealing with this sort of Mental Illness for most of the last and previous centuries.
It isn’t just bathrooms.
If classified as a woman, these mentally ill freaks can demand to share women’s only showers, changing rooms, dorms, probably homeless shelters.