Looking at it from a utilitarian perspective, one difference between the trans situation and racial segragation is that any behavioral differences between black and white people socio-cultural in origin. If black people really did present a greater danger to white people, it wasn't because of something biologically inherent to their race. As such, segregation was actually maintaining the problem that it claimed to solve. Doing away with segregation may have exposed some white people to more danger, but it was a short term harm (to them, and accompanied by short term gains in equal treatment to black people) that can potentially lead to long term gains for everyone.
The same is not true of the trans issue, since there's good reason to think that the differences in violence between men and women are biologically based.
The same is not true of the trans issue, since there's good reason to think that the differences in violence between men and women are biologically based.