Here’s actually a really good talk on the subject from one of my favorite comedians, Paul F. Tompkins.
https://youtu.be/ufz4W0puLPA
Basically, people don’t necessarily get mad at jokes certain topics because joking about them is inherently offensive, usually they’re just mad because the joke isn’t funny and is only hurtful and done to provoke outrage.