How playing a bad fictional character can still harm your real public perception

I guess thats why some black actors only play the dude type characters in a film, you know the loud up front attitude problem, black panther talkback types, because they understand the innate rub off between character perception and perception of the actor, by the plebian public ? who seem incapable of distinguishing the two ? Having said that most holywood characters white or black seem so narrow and riven with ridiculous stereotype its hard to swallow any of them. Will Smith and Samuel L Jackson only seem to accept such roles that make them look good, perhaps Billy Dee Williams aka Lando showed them why never to be the bad guy ? obviously jackson is better than smith by quite a way but still not great in my book. But I’m sure both have turned to directors at some point and said could we make my character say this or act like that or be a bit more like this, because I dont feel comfortable with these lines and such ? And thats how you end up with actors playing the same person in 20 films.