There are two ways medicine acts to change children's gender that haven't been mentioned yet in this thread.
Firstly, intersex babies and babies with abnormal genitals are routinely operated on by doctors to give them normal-appearing male or female genitals. Some of those surgeries include full sex reassignment (usually male to female, because it's much easier to surgically construct a vagina than a penis).
If you look, the internet is full of horror stories from people who were put through these unconsented cosmetic genital surgeries, by doctors playing God. In many cases, the sex doctors chose for the baby subsequently turned out to be the wrong one. Even when it wasn't, the people put through these surgeries often end up with so much nerve damage and loss of sensation that it's impossible for them to enjoy sex later in life.
oiiinternational.com/2574/intersex-genital-mutilation-igm-fourteen-days-intersex/
The second thing doctors have been doing is to administer high doses of synthetic female hormones (estrogens and progestins) to pregnant women, as treatments for preventing miscarriages and premature births. Many of these drugs have been shown to be capable of altering the trajectory of sexual development in animals, sometimes spectacularly so. For instance, at least two of these drugs (diethylstilbestrol/DES and ethisterone), are capable of completely overriding genetics in fish, and producing all female (or all male) fish populations.
There is evidence that they've also produced abnormalities of sexual development in human beings. I've found a number of case studies in which ethisterone, or a slightly modified version of it called norethisterone, were shown to have induced male development in female babies. The case studies all focus purely on genitals, however having now chatted online to several genetically people who were prenatally exposed to ethisterone or norethisterone, they show signs of having undergone male brain development. Two of the people I've talked to are FTM transgender.
Meanwhile, DES has long been rumoured to be associated with MTF transgender, and in the one study of DES and gender that's ever been conducted, 150 out of 500 DES "sons" identified as women rather than men. Many of the DES exposed natal males I've talked to show signs of physical feminisation too (in particular, a type of body structure called "eunuchoid habitus", that is usually associated with intersex conditions, and makes you look a bit like a cross between a man and a woman).
DES, ethisterone and norethisterone were all discontinued for use in pregnancy decades ago, however other synthetic female hormones remain in use. There's one in particular called hydroxyprogesterone caproate, that has feminising properties and certainly looks like it's being given in doses high enough to interfere with normal male development.