The TVTropes Trope Finder is where you can come to ask questions like "Do we have this one?" and "What's the trope about...?" Trying to rediscover a long lost show or other medium but need a little help? Head to Media Finder and try your luck there. Want to propose a new trope? You should be over at the Trope Launch Pad.
- Pragmatic Villainy: A villain does something evil or something good when it benefits them.
- Villain with Good Publicity: A villain who is popular with the general public. Doing an occasional highly publicized good deed while committing immoral acts on a regular basis would apply.
- This also sounds like some sort of logical fallacy, although logic is not my strong suit. "Bob's company dumps tons of pollutants into the ocean every year, therefor Bob's donation to charity is meaningless!" doesn't sound logical. A donation to charity is still a donation to charity regardless of who is donating.
You're quite right about the logical fallacy (it's tu quoque), but logic is only the beginning of wisdom, not the end.
What the OP seems to be seeking is Hypocrisy Callout - the character (or corporation, inasmuch as that makes sense for corporations - maybe Corrupt Corporate Executive could work?) is a Hypocrite, someone calls them out on this and they dismiss it.
Well they don't have to be directly involved, it could be Alice and Charlie discussing Bob's actions with Bob absent or not being involved at all (say Bob is a famous streamer and Alice and Charlie are talking about him on a forum, Bob Co. is a corporation Alice and Charlie don't work for, Alice is in a different department from Bob and Charlie, etc.).

A character or corporation makes a self-serving concession to liberal ideals without believing in them ("Yeah sure we're all for protecting the environment/the homeless/LGBT/war victims)". When called out on it, it's also pointed out that it's better they do this little than do nothing or even work against them.
e.g.