I think the example of this I saw that actually made a lot of sense was Altered Carbon, since a major part of that narrative is that they have essentially digitized your brain so no matter what body you're shunted into, You and your sense of self is unchanged, so gender is in fact immutable in AC.
SJ Klapecki (should be writing)
It's always wild to find out that an author of transhuman sci-fi is an outspoken transmisogynist. Like, pump the brakes, buddy – you think personhood is mutable but gender is innate?