but it was a much simpler time and most parents were sensible and taught their kids to behave appropriately in line with what gender they were
Yes, and they generally failed and caused horrific damage to their children in the process -- they still do, when it happens today. People may conform to social expectations but it doesn't mean they actually change their gender identity. It's similar to how homosexuality used to be considered a mental illness and was "treated" (unsuccessfully, in reality). Transgender people are one of many natural variations that are possible when it comes to how sex/gender develops, just as homosexual people are one of many natural variations when it comes to human sexuality. (And the sexuality of hundreds of other species.) Should homosexuals just pretend to be straight because in the past our society did not understand that homosexuality was not a mental illness but a normal and perfectly healthy form of human sexuality?
There is a famous case study by Milton Diamond, where a boy was reassigned female shortly after birth following an accident during circumcision. This boy never accepted his assigned female gender, despite knowing nothing of his original biological sex, and later transitioned back to male....this study is often cited as evidence that gender identity is innate, and has a lot more to do with biology than with socialization.
It also happens sometimes that intersex infants who are assigned one sex over another turn out to have a gender identity opposite to the sex they are assigned, and later wish to transition to the sex that matches their gender identity.
No one, to my knowledge, has ever provided any evidence to suggest that the mechanisms underlying the development of gender identity in transgendered people is any different than the mechanisms underlying gender identity development in cisgendered or intersex people, so it is reasonable to assume it is the same mechanism and something has happened biologically (likely before birth) to make it develop in opposition to all the other aspects of their sex/gender.
Transgender people who are raised to conform to their biological gender -- raised with very strict gender norms and no tolerance for cross-gender play or behavior or dress or mannerisms -- their gender identity is not changed because of their upbringing. They are simply truamatized and confused by being forced to act like someone/something they are not, being told they actually are someone/something they are not (and maybe that they are crazy/bad for even thinking, let alone actually voicing, anything in opposition to what they are told) . Many kill themselves.
Gender variant/transgender people have existed for a long, long time -- possibly for as long as there have been humans. There are traditional societies that recognized them and accepted them, validating their gender identities long before the concepts of gender identity or being transgendered (or "transsexual" as it used to be known) even existed in Western societies. (And by the way, there are stories of transgendered people in Western society dating back at least to the 1800s.)
Transgender children (at least those who have binary gender identities as male or female) can quite easily fit into society and be accepted if allowed to live as the gender that aligns with their gender identity, particularly if they are allowed to medically transition (or at least to hold off puberty until they are considered mature enough to make decisions about permanent medical treatments) and their birth-assigned gender is not public knowledge.
Gender variant children who do not have clear binary identities or who are well into puberty, or whose birth-assigned gender is widely known, also sometimes fit in and are accepted by their peers and community regardless. And if people didn't normalize and justify ostracization and cruelty they would be accepted all the time in all communities.
There is absolutely no good reason, in my opinion, to force anyone to live as a gender they are not. It hurts noone to allow people to live as themselves, as whatever gender their brain tells them they are. (Or even whatever gender they wanted to be -- transgender people are not choosing a gender identity, it is not something they have any control over, but even if a person just wanted to live as a different gender on a whim I don't understand what the problem with that is....whom would it hurt? Outside of an intimate relationship or a medical setting, why is it anybody else's business what shape a person's genitals are or what chromosomes they have? Why do you care what's in someone else's pants or under their shirt?)
There is no shame in being a transgendered or non-binary person, just like there is no shame in being a person with a disability -- meaning that there is no good reason to be ashamed of being any of those things.
Gender identity is not some fantasy or make-believe, it is not some kind of behavior or choice/preference, it is a real part of sex/gender, and it has biological roots.