Really, that's the litmus test for comedy. If you can tell an edgy/offensive joke, and it's a great joke, it stands on its own. It's above "cancellation". And lot's of jokes have multiple levels, something can be offensive out of context, but with levels of irony or meta commentary around it. Or they're just a brilliant joke. See Anthony Jeselnek, or Sara Silverman when she was edgy.
Don Rickles' jokes were mostly exquisitely crafted, hilarious, and have the context of a well known act and everyone in the audience there being 100% in on the bit. In the context of the show, the broad range of targets and the willingness of the audience made it implicit that behind the insults we all have reason to laugh at ourselves. That doesn't mean you have to like it, or can't be offended by it, but its legitimate.
Pull the same exact joke out of a Don Rickles act, and have the office bully direct it to the Asian guy in accounting, and it's not the same joke. We don't have to pretend it's totally cool.
Your uncle telling racist street jokes at thanksgiving...that's not funny nor needs to be respected. A comedian standing on stage yelling "rape rape rape", that doesn't need to be respected, I wouldn't book that guy, and it wouldn't be because he was offensive, it would be because he was offensive AND not funny, so what's the point?
Art can be messy and ugly, and still be art. But not everything that is messy and ugly is art. Some people on both the cancel brigade and on the anti-cancel brigade can't seem to tell the difference, but most people (and most comedians) can. Patton Oswalt can be forced into apologizing for thinking Dave Chapelle is funny, but he still knows Dave Chapelle is funny.