I keep meaning to post about my experience of shelters. I worked in a shelter with a 'sister' shelter. Mine was mixed, which means mostly male with a female section. In the female section, the female residents accommodated transwomen and made their own 'rules' about their comfort. In the sister shelter (all female) it was just for women. This meant that everyone was safe, everyone had a space and everyone worked around the actual issues. Without the law or shouting. The 'rules' just came about from the women, rather than being imposed.
The transwomen were, I believe, all sex workers at the time so there was a lot of fellow feeling and empathy between the women who worked and the transwomen. They all suffered terrible violence and fear.
Perfect solution as far as I can tell and proves that it is possible to be accommodating without giving up women's spaces entirely.