I think for me it's about understanding the mindset.
I'm more likely to play a man than a woman, because I don't really get the whole femininity thing. If I play a woman she either ends up not really getting the whole femininity thing, or she ends up a total stereotype. Stereotypes are fine for the short term, but I can't build a long-term character out of what I don't understand.
I'm more likely to play a character who's not straight. I'm not straight. I understand that different people find different things attractive; I'm not drawn to physical attributes, and faces are the things on the front of heads, so I find it hard to tell people apart and I've no real idea of what constitutes 'pretty'. It's all pretty academic to me, so I'm not overly bothered about it personally. I've also spent most of my life having my sexuality assumed for me, to where I talk about my bloke instead of my partner purely so people don't get absolutely shocked when they meet him. Being gay doesn't define personality or presentation, it's just another part of a character, and I understand it. No problem, off we go.
I'm not likely to play a dark-skinned character in the modern world - particularly in the US - because I don't really get the experience of a dark-skinned person in the US. I'm not from there, I'm aware that it sucks to degrees I simply can't comprehend, but the only thing I have to go on for the people themselves is stereotypes. Again, I can't build a long-term character out of that. A black Briton? Sure, I know plenty of them, I can play that - but their experience is rather different from the American experience, and I don't know where the pitfalls are.
Trans people? I got misgendered a couple of weeks ago, and I'm cis. I was able to laugh it off - even consider it a compliment - but if I wasn't absolutely sure of who and what I am it could have been devastating. This may change in the future, but I'm at not enough information for a long-term character at present.
Basically, I can't build a long-term character out of stereotypes. I know the stereotypes are wrong, but I don't have the experience to tease out the truth to where I can understand it.
This same thing is why I balk at playing American military. British military, no problem, I understand that. I've brushed against it since before I learnt to toddle, to where I've helped other civvies handle forces and ex-forces people. American? Not so much. Part of British Basic Training is extracting the personality, breaking it down and rebuilding it to what the military needs. I've seen what that does to Brits several times over, including the differences between those who've seen combat and those who haven't, from a wide range of backgrounds and eras. Americans? It's a similar process, but the results are different, and I don't know where those differences lie.