If you have a child under the age of 10, you can get them injected with puberty blockers so that they will never fully develop until you are convinced that they are the gender you want them to be.
Not only is this legal, it is a medically valid course of treatment for little kids.
https://www.mayoclinic.org/diseases-conditions/gender-dysphoria/in-depth/pubertal-blockers/art-20459075