At age 3 or 4? (not arguing with you, just expostulating)
With teens, it has already happened.
Parents lose custody of transgender teen
https://world.wng.org/content/parents_lose_custody_of_transgender_teen
Courts are already arguing this for 6-7 year olds.
Texas dad could lose custody of 6-y-o son for not affirming transgender identity
https://www.christianpost.com/news/texas-dad-could-lose-custody-of-6-y-o-son-for-not-affirming-transgender-identity.html
This is what "conversion therapy" bans are about. Most people think they're about a clinical setting. They're not. It's about stopping parents who might try to talk sense into their rebellious kids.