To me, the obvious answer is to do away with the concept of “gender” altogether. It’s a societal construct that doesn’t really need to exist in video game character creation, anyway.
Everybody is born one of two biological sexes: male or female. There. Those are your choices. Call it “apparent sex” and include a pronoun option to allow for players who want to roleplay gender nonconforming characters.