That is what this "bathroom bill" controversy is about - it's an infringement of individual rights when the government says "you must use the bathroom as assigned by your birth gender or identified gender and we have the right to check". If a transgender person decides that their gender assigned at birth isn't their gender identity and they would prefer to use the restroom they identify with laws like what was passed in North Carolina basically says "Nope you can't do that, we have to confirm what your genitals are and you must use the bathroom that coincidences with that".  The more civil approach is to keep the government out of it. Law or no law people who are predatory will be predatory. The idea of the government intervening and telling people which bathroom they are assigned to does nothing to keep anyone safer and infringes on individual liberty. 

If someone is being pervy in a bathroom then that's the violation - simply being transgender isn't perverted or violating anyone.