Agreed.
But, essentially, this type of policy is precisely what would be required if those who oppose transgender inclusion wish to carry out those prohibitions to their natural conclusion.
I don't see why sex or gender should be a factor in ANY written law that compels somebody to do something or avoid doing something.