“I believe that all artists should be considered equally and fairly.” So said Scarlett Johansson, after withdrawing from “Rub and Tug,” a film in which she had been cast to play Dante Tex Gill, a transgender man.

That belief in equality seems banal; who could object to the idea that the most qualified person should get the job? Apparently, a lot of people. (Including those who intimidated my former employer into silencing my attempts to defend Johansson.)

And unfortunately, the rest of Johansson’s statement, and her decision to withdraw from the film following outrage from the transgender community and its allies, demonstrates a lack of commitment to that very concept. Her detractors criticized her for accepting the role in the first place, arguing that there are a limited number of transgender roles, and they should primarily be played by transgender actors.

Trace Lysette, a transgender actress, went further on Twitter: “Hollywood is so f–ked . . . I wouldn’t be as upset if I was getting in the same rooms as Jennifer Lawrence and Scarlett for cis roles, but we know that’s not the case.”

Whether or not Lysette is as talented as Lawrence or Johansson is now apparently beside the point.

The left’s abandonment of equal opportunity isn’t new. Affirmative action, when taken to its extreme, is why Asian-American students must score about 450 points more than the average black student on the SATs to gain entry to the same elite schools. It’s why Harvard currently finds itself in the midst of a very nasty, very public lawsuit over its allegedly discriminatory admissions process.

The pendulum on discrimination has swung too far in the other direction. While there are still industries in which males vastly outnumber females, and whites vastly outnumber minorities, American society has made remarkable progress in rectifying this issue.

Such progress is what makes the outcry around Scarlett Johansson seem petty. After all, there’s been only elation about musicals like “Hamilton” and the “Book of Mormon,” in which minorities play the parts of white figures and non-Mormons play the parts of Mormon missionaries. What’s the meaningful difference in these three situations? There is none, of course, other than that in our overly ideological culture, only certain groups of people are deemed worthy of protection.

In the hierarchy of “liberal” identity politics, someone’s always on the bottom, and the Harvard discrimination case shows that it’s not always white men. Sometimes it’s Asian-Americans. This time it was Scarlett Johansson.

That double standard is not justice. It’s vengeance. And it’s vengeance against a group of people who aren’t responsible for the injustices of the past. It’s collective punishment, and it’s being carried out against students applying to college, graduates seeking their first jobs and people in all professions looking for new opportunities.

Aside from that one line about equality and fairness, the rest of Johansson’s statement was pure lip service to the activist mob “defending” the transgender community. In fact, she grounded her decision to withdraw in the way they reacted: “In light of recent ethical questions raised surrounding my casting as Dante Tex Gill,” she explained, “I have decided to respectfully withdraw my participation in the project.”

It’s a shame Johansson chose this route. While the far left will doubtless see her withdrawal from the film not as a sop to identity politics but as delayed rectification of a sin, and some might even praise her for it, Johansson should have stood her ground and been not a sacrifice to the gods of leftist cultural hegemony but a hero to the millions of Americans who are uncomfortable with a small but loud minority deciding how the rest of the country thinks, speaks and acts.

The ultimate irony here is that her decision to walk away from the project will hurt the film and the transgender community. This movie, if it gets made at all, won’t have the high-profile allure and the phenomenal acting of Scarlett Johansson. How this helps the transgender community is anybody’s guess.

It is of course Johansson’s prerogative to take or reject this job. But what happened here was that she made a choice, faced criticism and then kowtowed to the mob — and the mob only gets hungrier when it eats. Each victim it claims only reassures it of its new place in the food chain. Beware a predator that knows its strength.

Daniella Greenbaum is a writer living in New York.