social commentary is integral to art - not all art is social commentary, but theres always been political art.
in comics specifically, there has been a lot of politics - the x men are the best example, but captain america was a political statement in his time as well. jack kirby was a very political man.
i think the rule 'show dont tell' still applies to politics in media - in storytelling, its the difference between a story and propaganda.id far prefer a story to explore an argument for and against and ask questions for the audience to answer - while nudging them one way a little - than the moral being just 'x is bad.'
For good examples... Cleverman (australian tv) does the fantastic racism trope really well, i often like ms marvel's approach to things (some ppl think its preachy, but to me its clear the target audience for the comic skews younger, and towards people interested in those issues. not sure how i feel abt a lot of other marvel stuff though), black panther (film and ta-nehisi coates' comic), the handmaids tale (again, book and tv series. fuck the film)
for bad examples: the film crash, 13 reasons why, bright, id also say harry potter (and all extended universe iterations) is a pretty bad example, being lazy, half-arsed, and often carrying seriously racist subtext despite the anti racist text
ill also say, because no media exists in a vacuum, all media can be read through a political lens. the bee movie? its pro slavery and pro capitalism. the incredibles? totally randian propaganda. i mean, not really, thats far from the authors intent, but they can be read that way. racial theory, feminist theory, queer theory, marxist theory... you can apply these things to any piece of work. your biases always wheedle their way into the subtext.