I can't speak for the science as the broader subject isn't one I've spent any time studying, though I know from personal experience that being raised as the "wrong" gender didn't really change my own in-built traits and interests which seemed to come more from my personality than my environment. I did pick up a few interests in the process that I may not have otherwise been exposed to, but generally speaking I am somewhat stereotypical in a way that couldn't have originated from socialisation. Seems the same is true for most others I know who've found themselves in the same situation.
There's a famous example used in psych classes of an individual born with ambiguous... parts, and the doctor basically made a call to assign them as female. They had huge difficulties because the doctor made a mistake, and that individual eventually committed suicide later in life.