One notable case addressing your question is bradley manning.
I believe 90%+ of male prisoners would say they’re female if they could go to the women’s prison instead of the men’s prison.
The Obama administration should be forced to comply or shut up. Unfortunately for us, Obama would probably like that in courts because he doesn’t care how much it cost taxpayers.