How can you say it is not a delusion?
The definition of a delusion, according to the Oxford English Dictionary, is "An idiosyncratic belief or impression maintained despite being contradicted by reality or rational argument, typically as a symptom of mental disorder."
This girl has an idiosyncratic belief she is a male. However, she has no Y chromosomes in any cell of her body, she has a uterus, va**na, fallopian tubes, she produces eggs but no sperm, she has no prostate gland, no p**is, and no testicles. Reality and biological science say this is a female.
Kinda fits the definition of delusion.