This is the kind of thing managers need to side with their staff on. Don’t encourage mouthing off to customers like that, but definitely don’t encourage customers to demean staff like that. Just because someone works in the service industry doesn’t mean you have the right to treat them like shit.
I was delivering food to another server’s table and a woman from another table pretty aggressively grabbed my arm so tight I couldn’t walk away. I didn’t say a word, but I gave her a “how dare you” look and she apologized, then we moved on to whatever the hell she wanted. There’s no need to tolerate rude behavior, but there’s a way of going about it.