I love John Lithgow as an actor but his reasoning here is horse shit.
First of all, the article's justification for Roald Dahl being an anti-Semite is his family apologizing for his anti-Semitic statements 30 years after he died. Meaning that money from any of Dahl's work would go to Dahl's estate / family, the people who apologized for his anti-Semitism, not the man who is claimed to be anti-Semitic.
Secondly, the play that he was in wasn't even written by Roald Dahl and didn't benefit his estate, it was in fact, a play written by a Jewish playwright.
Thirdly, that play was written explicitly to address his anti-semitism. It would be like acting in a play about JK Rowling's anti-trans crusade that in no way financially benefits her, this is clearly not the same thing.
And finally, on top of all that, from everything I can find, the accusation of Roald Dahl being anti-Semitic originally surfaced because of anti-Israel statements that he made in a book review after Israel's invasion of Lebanon. There was one follow up interview where he made some comments that do seem, quite frankly mildly anti-Jewish, but again, this is in the context of a 67 year old world war 2 vet expressing his anger about Israel turning from victims into aggressors. And that was it.
He didn't campaign against Jews, he didn't get any anti-Jewish laws passed, he didn't spread anti-Jewish hysteria, and it was never something he dedicated any actual time to writing about.
The situation between appearing in that Dahl play and appearing in Harry Potter is not remotely comparable.