Presumably we're banning braces as well then.
The Texas law is based on a theory of there being a fundamental right to procreate, which is harmed by the sterilization effect of many gender-related procedures. If you could come up with a theory of harm for braces, you could make a case for banning them too. But I doubt it would be as grave a harm as removing sexual function.
They banned sex changes for minors. That’s not “hating trans people”, that’s just a policy you disagree with when it comes to defining the degree to which a minor is legally capable of consenting to an adult irreversibly altering their body.