What I’ve noticed often works well is to not laugh politely but instead honestly ask ”How do you mean?” / ”Can you explain what you mean with that comment?” / ”How do you think that would / did make her feel?”
Showing honest curiosity does not set up for conflict but often the person becomes really squirmish and excuses what they said. Having them consider what they said in this way I hope at least sets off some sound self-assessment. They rarely speak like that in front of me again but I of course don’t know if I’ve just become another person on the list to speak ill of.
Perhaps it would be better in some cases to be more direct but as soon as there is a sense of conflict I find that most just shut off and become resilient to evaluating their behavior.
But I feel you; I’ve been in many a situation where there maybe was a family dinner I didn’t want to disrupt. But even then, a curious ”What do you mean with that comment?” could probably do wonders.