Well, the first thing to say is that my 58 year old self's view of my capacity at 12 may not be the most reliable piece of evidence, but...
... at 10 and a half, as a member of a strong church-going family in a Somerset village where my father was Chairman of the Parochial Church Council, and the vicar led a bible study class for the senior class in the village school, I decided that I did not have religion and was able to express that conviction with sufficient cogency and conviction that I was allowed not to attend chuch again. And I have never waivered in that conviction. Were this not social media, I would tell you the tale of that fateful Sunday morning, which I look back on with enormous respect for the way my father handled it, and even more respect for the Reverend Luxmore-Ball.
My belief is that I had all the capacity required to make a choice about my gender aged 12.
Which does not mean, of course, that anyone else does or does not have that capacity or that it is, or is not right for a parent to give that consent, all of which depends on the facts of the particular case and, to some extent, the treating clinician.
Declaring atheism within a church-going family at age 10 to 12 is a classic (that is, bog standard normal) developmental step for bright children at that age. It fits perfectly the 'hyper-rational, emotionally undeveloped' immediately pre-pubescent phase I described upthread.
It doesn't indicate any capacity to make decisions about things you have yet to feel, experience or understand.
It is one of the earliest baby steps on a long, long journey towards cognitive, social and emotional maturity, that takes place over the following 12-15 years. It signifies the first inkling of self-realisation; 'I dare to say that God is not actually watching me, so I can say what I like about God'.
I went through the same renunciation of religion at that age. At the same and immediately following pre-pubescent developmental stage, I thought that people should decline medication for mental illness and overcome it through power of will instead. I could not comprehend suicide (remember this from a TV drama), thinking an unhappy person should just move away from the source of their unhappiness, move to Australia for example and create a new life. I had no emotional or social comprehension of why that might not be possible.
All very juvenile, very power of the will, deeply immature, utterly unequipped to make adult decisions.