To begin, thank you very much u/N8theGr8 for showing me this, I owe him all the credit for this.
American Psychological Association, the American Psychiatric Association, the American Medical Association, the American College of Physicians, the American Academy of Pediatrics, the American Academy of Family Physicians, the National Association of Social Workers, the National Health Service, the Royal College of Psychiatrists, the British Association of Urological Surgeons, the British Psychological Society, the Royal College of General Practitioners, the Royal College of Nursing, the Royal College of Obstetricians and Gynaecologists, the Royal College of Paediatrics and Child Health, the Royal College of Physicians, the Royal College of Speech and Language Therapists, the Royal College of Surgeons, and the UK Council for Psychotherapy
The possible psycho-genie or biological aetiology of transsexuality has been the subject of debate for many years, but the current medical consensus is that gender identity DOES actually include a major biological component. We have no idea what the details are (a gene, multiple genes, etc?) but we have pretty strong data that it's something durable and biological.
Some brain studies do show differences associated with gender identity rather than with external body parts - One study showed that the volume of the central subdivision of the bed nucleus of the stria terminalis (BSTc), a brain area that is essential for sexual behavior, is larger in cis assigned males(AMAB) than in cis assigned females(AFAB). A smaller-sized BSTc was found in AMAB trans people. The size of the BSTc was not influenced by sex hormones in adulthood and was independent of sexual orientation.
The study was one of the first to show a smaller brain structure in AMAB trans people and supports the hypothesis that gender identity develops as a result of an interaction between the developing brain and sex hormones.
One researcher believes that it is due to intersex conditions within the trans person's brain:- Gender Orientation: IS Conditions Within The TS Brain
Also, we know that the attempts by the medical establishment to surgically change body parts of intersex children based on what seemed easiest surgically was not always in line with the person's actual gender. The thinking back then(and even today) was that gender identity was not biological. When the data was carefully collected, a majority of kids treated this way have a gender identity at odds with their surgically created body parts and upbringing(socialized as male/female). This is proof that we cannot change the gender identity someone already has innately. They often are trans because instead of waiting for the child to grow up to tell everyone their gender, the doctors made the wrong choice of gender.
Sexual orientation has also been shown to have biological roots. Twin studies and genetic linkage studies have shown both hereditary patterns in homosexuality (attraction to one’s own sex), as well as genetic associations with specific parts of the genome. And while gender identity has been harder to pinpoint from a biological standpoint, efforts to understand what role biology may play are ongoing.
Here are a couple more studies that show that both sex and gender lies on a spectrum:-