I would say that I see this kind of thing in healthcare all the time: divorced/separated parents who cannot agree on the child's healthcare. This ranges from refusing oncology care for your child with cancer because you believe in 'natural' care, to one parent refusing vaccines, to one parent not wanting the child(ren) placed on ADD/ADHD meds.
The legal system is how we mediate these unresolved disputes. I am not sure why the conservative/religious right has chosen a low-life like Mr. Younger to be the poster child, except in how it feeds into their beliefs on gender dysphoria.
But the court in Texas seems to be doing what is typical: a guardian ad litem is appointed for the child, the GAL submits a report, the Court hears expert testimony from both sides, each side says the other side's experts are wrong and misguided, and the the Court has to weigh all this and make a decision that likely does not please everybody, and then the judge goes home that night and drinks heavily, because we all hate these cases. In my experience, the Court gives weight to the parent who has primary custody to make these sort of healthcare decisions. So Mr. Younger had an uphill row to hoe from the beginning.