The simplest answer is to segregate by sex, it's not clear why gender identity should require moving to another facility.
Regarding the supposed issue of safety of trans identifying male prisoners in male prisons (I haven't seen data around this but let's assume it's an issue), it's still not clear the answer is housing with women. If a gay man is more likely to be abused in a male prison, or a small or young man, does that mean men with any of these characteristics should be put in women's prison to improve their safety conditions? This doesn't scan.
Its notable to me that as concerned as you are about prisoner safety, I don't see you or other advocates of males in womens prisons mention the safety of the female prisoners should men be added to their cells. Does their safety not rate?
> Its notable to me that as concerned as you are about prisoner safety, I don't see you or other advocates of males in womens prisons mention the safety of the female prisoners
Strange that despite the much higher rates of sexual assault (inmate on inmate and staff on inmate) for women in the sex segregated prison system we have, the only time safety of women prisoners gets brought up is as an argument for preserving sex segregation against the fairly minor tweak of gender-identity segregation and not about trying to figure out why a system adopted specifically to isolate and impose harsher punishment on women because they were viewed as incapable of rehabilitation once they had fallen into crime continues, despite recent retcons of it's supposed justification, to disproportionately sexual victimize women.