But that's not the actual choice prisons have to make. The choice they have to make is "which cell does the trans woman go into"? Given that there likely aren't enough trans women prisoners to put them only with other trans women, the choice is "with a cis man or with a cis woman." And I believe pretty strongly that putting a trans woman in a cell with a cis male is more likely to result in assault than putting a trans woman with a cis woman.
I could be wrong. But given what I've read about trans women being the target of sexual assault outside of prison and sexual assault among males in male prisons, I think it's a fairly safe bet.
I guess the question hinges on whether you imagine a trans woman to be more "like a man" (stereotypically stronger, aggressive, and more prone to perpetrate assault) or "like a woman" (stereotypically weaker, passive, and more prone to being the victim of assault). What I know about trans women suggests the latter more than the former.
Obviously, individual behavior trumps all. Any particular woman (trans or not) who has a history of violence or sexual assault towards women should not be housed with another woman. The same should be true for men (again, trans or not).
The name of the game should be keeping perpetrators away from victims, and my belief is that "has a penis while other has a vagina" is a relatively poor proxy for that. Yes, there is a strong correlation, but that's a Simpson's paradox from combining the much smaller trans population with the very large cis population. If you were to separate out the datasets and consider cis men and women separately from trans men and women, I suspect you would see no or the opposite correlation.