This is interesting. Looking at the actual rule, there seem to be several underlying concerns: ensuring that single-sex or sex-segregated facilities have the right to remain single-sex or sex-segregated (if that is their desire), ensuring that victims of domestic abuse, human trafficking, or related crimes have the right to not be housed with people of a different biological sex if they are uncomfortable with it, and then the infamous "my freedom of religion allows me to discriminate against anyone I disapprove of" nonsense.
The third aspect is probably unconstitutional at this point (and if it's not, it should be). The other aspects are a much thornier issue involving a conflict between the rights of two different oppressed minority groups to feel safe.
It's not a religious issue. There are genuine tensions between the transgender movement and various parts of the feminist movement, and it's not unusual for the feminists to be threatened with violence and rape. I would have no problem allowing post-op trans-women at women's shelters, but given the virulent misogyny and entitlement to sexual access to women I see within certain parts of trans-activism (see, for example, the term "cotton ceiling"), I do have concerns about self-identification being used as the criterion. I think there needs to be a better solution than overriding the rights of one group entirely.