I like commentary on such things. Of course it has to be handled well in order to work, as there are a lot of ways portraying racism can go wrong.
The web animated series RWBY, for example, portrayed Racism as something basically over now, only leaving it to a few bad apples that people have to deal with. Then made antagonists a parody of the Black Panther Group, showing a misunderstanding on said group and racism. Its the form of racism that's superficial to try to make their story seem more complex than it actually is, despite how they either sweep racism under the rug or villainize minorities.
The concept of robot racism is also something that I'd consider bad in most cases. The only time I thought it worked was Astro Boy 2003, but I'm also nostalgic for that series. In most cases though, allegorical racism often ends up falling flat. Because robots are by definition, tools and not human, so it ends up not lining up with reality. The same is with animal racism, because animals are different from each other. If your going to make a story about robots or animals, make it about robots or animals, cause the allegory thing comes off as pretty weak.
Of course there are ways to do racism well. You don't have to be super overt, but your story needs either a certain amount of subtlety. Racism is both simplistic and complex at the same time, so you can't just have there be racist a-holes, you need to address it properly in some way. In my own writing, racism is a tool by the upper class to keep groups of people separated and fighting amongst each other, or to justify whatever agenda they have. And its not something the main or side characters are immune from either.
I take chapter to imply that once upon a time, even the protagonist was queued into these societal norms, that even if she wasn't raised a racist, the society around her had given her some of those inherent biases. She grew out of it because that was part of a flash back, but its important to show that there's something wrong with society itself. A side character in season 2 is a racist, and she only changes after her very perception of the society she's lived in has shattered completely. Racism also isn't her only character trait, its only most overt when she tries to double down on her bad behaviors.
That is to also say that its important to make someone who would normally be likeable a racist. In an episode of Teen Titans, they meet a cool superman like figure whose a really good guy, except that he's racist. Said racism eventually creates a rift between him and the team, and in the end it never gets resolved, because racism isn't a simple solution to resolve. His only resolution was that Star Fire was "one of the good ones". Its a much smaller portrayal that says a lot and shows how racism doesn't make sense.
A lot of fiction stories will try to make racism logical. This is incorrect. Racism is both simple and complex, in that it doesn't make sense. This can be difficult in writing, because stories are often written with a certain level of logic, so explaining racism alone is difficult. That's why I tend to make it a symptom of greater societal conflicts instead of the conflict. The ultimate struggle then become "how do we make this subtle and overt at the same time?"
Everyone has their own solutions and its hard to really say. I like to think of my portrayal as the best, but many might thing it over the top and cartoonish. There's not really a right or wrong answer. Some people might just want to avoid racism altogether, because its too difficult to write properly. This is a good answer too, though I personally can't escape from it.
No, seriously, I've tried to get away from writing this kind of stuff down before, but its just something I always come back to. Like its a fixation or something, and when I decided to make it more integrated into the story in what I view as a realistic and natural way without any allegory, then I think the pieces were able to come together.