At some point, the only winning move is to not play the game at all.
Donald Trump says outlandish, stupid, racist things because he wins these "battles" every time. How many times in 2016 did Trump bait someone into a response and then come out on top in the exchange? It happened over and over and then he won the Presidency.
If Trump says a racist thing, it's him challenging you to a duel, where he picks the weapons, the location, the time of day, and the rules of engagement. This is where he is comfortable; in a race to the bottom the bottomless pit wins every time.
There's a reason he started being super racist recently--to draw attention off of Epstein probably, but maybe something else. Maybe he thinks that moderates from swing districts are the glue holding the Dem majority together, so by attacking these four progressives he can force them to become the face of the party (get ready for some disappointingly effective AOC and Omar attack ads in swing states!). He racks up so many points by stirring this shit--his polls went up in his racist ass base, he takes attention off of other shit, triggering libs is half the point anyway, and he gets to divide liberals.