For Cartoons... 90s... late 80s
I mean in all fairness there was outright racism in cartoons at the time (Just see the "Bad episodes of the Ghost Busters" By Phelous to get basically a documentary). There was a large belief that girls were anti-conflict as well that permeated television at the time and actually was one of the large reasons why even female leads often didn't get involved with the plot in "guy shows" and why "Girl Shows" often didn't have anything of any substance.
Yet whenever I dive deeper I see things like making a villain white because they a evil minority would be seen as bad... All the way to the early 2000s. Or heck characters like Porky Pig and Speedy being flat out removed from future shows because they are considered offensive (but... not from people with speech impediments or Mexicans)
The correct way would be to create completely normal character, flawed as meant to be, who just happens to be of a particular race, culture, gender or whatever. While said fact can have weight on the plot, it shouldn't be treated as anything out of the usual. Mutual respect doesn't mean pandering.
Oddly enough it isn't so cut and dry.
One of the most popular Disney characters flat out without any real competition until Elsa is Belle whose issues are outright tied to her Gender and her gender identity is tied to her character and actions. Yet she is probably the most relatable characters Disney made simply because "she likes books".