I basically coin flip. In games like Mass Effect, I'll play a male character and then years later play a female character -- just to encounter new conversation trees.
In D&D or something like that, it is somewhat harder, due to pronoun hell at the table (I sympathize with anyone having to deal with this on a larger scale -- it's insane on a small scale, and I can barely imagine being trans and having to deal with that...)
I play in 2 games and run 1. As a player I play both characters who share my gender and one that doesn't. At the table I run there's a guy who plays a woman, and used to be another.
It's never caused issues or confusion. So for anyone interested in playing like this, feel free to do so! For pronouns I've also found success in referring to characters instead of players with names unless explicitly talking to the player, but that's easier as a GM.