Third spaces are as ever the only rational answer. I'm perfectly happy to respect that some men feel feminine/do not feel comfortable in their bodies or with masculinity/have multiple reasons why they prefer to wear skirts, have long hair, enact their internalised stereotypes of what they perceive womanhood to be, and it's naive and ridiculous to deny that sex plays a large, front and centre part in this for adult transitioners. You cannot separate the reasons for transition without mind melds and why gatekeep it anyway?
Provide trans wings, men are free to identify and enact what they like, and if the prison service want to support the freedoms of identifying as different species or Klingons or elves, that's up to them. Any read of a prison officer's memoir will quickly tell you; mens prisons are boring, anything that adds entertainment and stimulation will be grabbed for. They're also a hotbed of bloody awful psychology and behavioural issues 24/7. If you offer male sex offenders, who get off on power, control, coercion, intimidation, and the fear and distress of women, then you'd have to have the IQ of a small brick to not understand immediately why access to a women's prison would be a much better plan than being banged up with a lot of blokes.
The bottom line is I'll respect men's rights to do them however they wish. But not at any point to be anywhere near women's provisions, or provided with non consenting women's bodies as resources for their use. No men in women's prisons ever. Men can be TW. No man ever changes sex.