It may be that while many aspects of gender are defined socially, gender identity itself may be closer to innate. And sexuality is related to gender but doesn't always cut along the same joint as gender - some people are attracted to a particular gender identity, some people are attracted to a particular type of genitals.
So when you put it all together, it can make sense how sexuality can be more innate while gender can be more malleable