Attitudes may not quickly change, but the average person is wrong scientifically. Identity and gender roles are independent phenomena, as are identity and sexuality. Otherwise there would not be gays and lesbians. All homosexuals are cisgender, meaning they are happy with their perceived gender and physical anatomy. The two are congruent, but their sexual proclivities vary from the norm. Your example of a woman pegging her husband is an example of sexuality, not gender roles. Human beings have widely varying sexual appetites and tastes which are unrelated to gender roles. A couple’s public gender roles might be quite normal while what might make them happy in the bedroom may be rather kinky and at variance with traditional standards of gender appropriate sexual behavior.
By contrast trans people have genders which do not match their physical anatomy. They may or may not accept the societal roles associated with their gender in the same way as cis women may or may not accept them as well. They also may or may not be gay or lesbian. To complicate things further, they may or may not need to completely change their anatomy. Many trans women stop with orchiectomies or just get vulvaplasties or even undertake no surgeries (change in presentation is enough), which can hardly be described as obtaining fully functional genitals. Sex is not the driving factor. But whatever they do is all they need to overcome their dysphoria. Non heteronormative sexuality may also be present in the dysphoric, but not necessarily so.
Psychologists generally maintain that sexuality does not change with physical transition (though attitudes are changing in some quarters of the professional community). If a transwoman liked women sexually before surgery, she will continue to do so afterwards, though obviously encounters are far more awkward. This was my case. I was a red blooded male who only liked women. I actually found the idea of gay sex repulsive. I still like women, though the idea of a heteronormative encounter with a man now has appeal. I am still not gay, maybe bi or pan but not gay, and no I did not have latent homosexual tendencies pretransition.
The science of what causes homosexuality versus being trans is also different. Surprisingly the causes of homosexuality are more poorly understood. It seems to be related to stress of the pregnant mother resulting in high cortisol levels during fetal development as opposed to a genetic and/or biological developmental variance resulting in people being trans. Having said this, epidemiologically there is some indication that homosexuality may have a genetic component as well since it is often clustered in certain families, but the mechanism is poorly understood. Do not confuse gender identity and dysphoria with sexual orientation. The two are unrelated.
The idea that trans people may need to change their bodies to become heteronormative sexually and that the two are therefore connected is actually an old disproven idea originally proposed by Ray Blanchard as part of his theory of autogynephilia as the driving force behind many older trans women. It has been throughly researched and debunked. The concept still appears from time to time on transphobic channels as part of the justification for the argument against the authenticity of being trans, but has no scientific validity