It's difficult to believe that there are really adult, presumably smart, people enacting these laws, and not wondering what they would do in this situation.
He's going to be another man who's 'at it', isn't he!
As was pointed out at the time, some men pretend to be women, and some men pretend to pretend to be women.
They're all at it.
But at least it's perfectly obvious why they want to go to a women's prison, there's method to their madness.
The people letting them, not so much