This should be an interesting thread.
I've have seen many players play opposite genders in my game and not once have I seen a player use the gender to deliberately play the gender poorly, but neither have I seen them play the gender with any genuine depth. I did have one player MANY years ago when we were adolescents play a female that was an over the top promiscuous woman, but he also played a male character that way, too; so as creepy as it was, it wasn't a gender slam, and the group self-corrected. [even the player struggled to portray the sexuality well as, at his young age, he did not have enough of a frame of reference to execute the role play decisions. so it was a short lived experience] I have never seen a player play the same gender and race consistently, unless it was as themselves. So I do not think there has been an issue.
That all said, the depth of background to form genuine role play motivations is a problem for any player, regardless of gender. All player project a portion of themselves (to make the character relevant to them) as well as their own understanding of a characteristic they wish to use to shape the character. But unless the player have genuine experience (real personal experience) that matches the background of the character, it is contrived. Does a player who never had to practice anything really understand the work ethic required to become proficient as a fighter (or do they think it is achieved by natural genetics, Rocky montage, or trained-once movie Conan?) Can a player really role-play the brooding and silent suffering of a character who lost a family member without having to have really lost a family member? Almost all role-play is going to incorporate superficial understanding of the role, and seldom with enough depth to put it in context. At best, players can learn more about a characteristic by role-playing them, but it will only be in the context of the role-played game and their own personal experience.
In my experience, the younger players tend to gravitate toward stereotypes most; and older players tended to have more depth, but that may not necessarily due to more knowledge of others as much as a larger life experience that informs them.
I think about this a lot, actually. At least if you're something like a sorcerer, that can be purely "unreal". But generally you want to play something at least a little unlike yourself, that's somewhat the point. It's escapism. But at the same time even in fantasy there are going to "real" elements one cannot personally attest to, and whether or not it's a question of appropriation, it can make you feel like a poser. Like if I was playing a ninja character around my friend Naziyah, who is btw an actual Ninja I'd probably feel kind of goofy. Other players with actual skills your character claims to possess sort of have to be in on it and encouraging for it to feel "right" I think, or else the illusion falls apart. I think one of the answers is: if you can't go in depth emotionally with a certain aspect of your character: don't. It's a thing, it's there, you might mention it from time to time, but try not to make too big a deal of it or the seems will begin to show. And if possible, make sure to read up a bit to make it more believable. When I decided my character had been a Courtesan on the sly, I had read quite a bit about Courtesans and talked to sex workers, even though it wasn't ever going to be an aspect of the character I really talked about in detail, since again not that kind of game. But it helped me get into the headspace of a character like that, which is important. Reading up about similar characters, and writing short stories about your PC can help with that too.