Government has no place in the home.
If legislation is necessary legislate what medications/procedures doctors can provide children.
I am of the opinion that the "age of consent" set by each state be applied to set the minimum age at which a child can make gender altering decisions and doctors can provide the services requested.
Kids are easily swayed by external influences.
Their parents generally mean well. They want their children to thrive and be happy. But often parents are too indulgent with some living vicariously through their kids.
There are age requirements for other behaviors/activities that require a certain level of maturity - working, driving, having one's own bank account, consenting to sex with adults, purchasing alcohol/tobacco, etc. Why should the decision to permanently alter one's chemistry, modify one's body warrant any less safeguarding?
I believe it is a standard medical practice that a tubal ligation will not be performed on a woman of child bearing years, under 25 or 30, that doesn't already have two children - barring medical necessity. Feel free to fact check that as I am unsure if it is universal practice or just doctor's choice.
Again, my opinions. When it comes down to it, it's neither the government's nor my business what goes in anyone's home or what they do to themselves.
So, I would disagree with the law you describe.
I would perhaps install a required period of documented psychiatrically care for the child and the parents, jointly and separately, at a minimum to determine if it is truly the child's desire or the parent's desire. Impose this on the medical establishment leaving the home autonomous.