Honestly no real preference.
If it's an MMO or a really Deep RPG, where I plan on more than one character.... Usually, my first one is a bit of a "Self-insert" so male. But then other playthroughs it'll vary on a number of things from, class, to the type of game, to the story, if there are multiple class stories like in SWTOR, if it's voiced.
But also, if it's a fully voiced game, I go with the better performance. It's that simple, If I'm going to have to hear a ton of dialogue often more than once if I'm doing more than one run, I just want the better actor. For example, I got into Mass Effect way later than the rest of the world, and everyone said FemShep was the way to go, better VA, so that's what I did.
With CP2077 I flipped a coin, I sort of knew that my Corpo V was going to be female, and my Nomad V would be male, Streetkid was a coin toss. so I literally picked the lifepath randomly When I got street kid on my first go, I flipped heads = male, tails = female, ended up playing Fem V. After playing a Nomad/male V I like Female V's performance better so now I usually play female, Although I'll admit, I prefer Panam as a romance option so losing out on that does sting a bit lol.
But yeah, I'm good either way, if it's a premade/handcrafted/static protagonist I don't care about gender at all just give me well written characters. If I get the choice or get to make my own, I may consider the character I'm trying to build, or I may make them randomly or I may do a "Self-insert" or any combination of those things. Definitely enjoy a well written female character as much as a male, I'd play a Ciri spinoff if it was done well.
Sidenote, if it's a game like AC: Odyssey Where there are two options, Like Kassandra or Alexios, I'll go with the "Canon" option assuming there is one. Again, don't really care about gender just want whatever is closest to the intended story if it's in a big series, something about going Non-canon just feels like playing wrong, there are 20 games in the series I don't want to find out my ending has no connection to the next game lol.