This just keeps being repeated, as if it's fact, but it's just not true. In fact, it's less true than the opposite conclusion.
It's been shown, repeatedly that toy preference, conflict resolution style, gender identity, and now even the genetic programming of the immune system are very different between the sexes, and exist at birth.
I'm not aware of any reason to believe sexual preference doesn't fall into the same bucket. In fact, wasn't this the entire basis of the gay rights movement?
The literature is extensive, and I don't have time to list all the references at the moment, but here's a couple to start off with:
https://en.wikipedia.org/wiki/David_Reimer
https://www.psychologytoday.com/blog/the-scientific-fundamen...
For further reading, you can browse through "The Optimistic Child" by Doctor Martin Seligman.