AITA for shouting at my uncle during a family meal?

So for context, I’m close with my mother, brother and grandparents, and my auntie and uncle are the family members I struggle to get on with.

They’re the type of people who use edgy/shock humour to get a reaction out of people and I’ve told them multiple times to stop making those kinds of jokes. I’ve opted to use the naughty child approach and ignore them for a few reasons: generally, I don’t want to give them the reaction they are desperately trying to get out of me and honestly, I don’t get to see my family very often. I miss them and I don’t know how long left I have with some of them. I want to value the time I have with them, not get upset.

So when I visited a few months back, we went out for a meal as one or two of us have birthdays around that time. I was a bit fragile I must admit, I saw two family members in the days leading up to the meal that had rapidly declined from dementia, I was already worried about the meal as I knew my aunt and uncle were going to be there, and I was generally having a bit of a tough time in life anyway due to my job/living situation etc. So I was on edge the entire time.

Anyway, the inevitable happens. My uncle cracks a joke. I won’t repeat the joke, but he opted for racism this time, and I snapped at him. I can’t even remember what I told him altogether, but I know I snapped at him to the point everyone in the restaurant went quiet. My family then erupted, my grandma just seemed confused because she didn’t hear him make the joke in the first place, my auntie weirdly stuck up for me and told my uncle to calm down, and the other family members immediately jumped on my case and told me I shouldn’t embarrass all of us in the restaurant. I excused myself, sorted myself out in the bathroom because I was on the verge of tears, and I left the meal early.

Since then, my family still see me as the person who was in the wrong that day. I went back for Christmas and I was in an even worse mental state. I remember my uncle was on my case the entire day calling me a snowflake etc. but I just couldn’t bring myself to care, as I said, I was in a pretty bad state at that time with a few other things that had gone on.

After they left, my mother told me I had coped well as I didn’t shout at him once. I’ve explained to them before, not only should he not be making these jokes in general, but my friends are such an amazing, multicultural group of people. How the hell am I NOT supposed to stick up for them? And on top of that, it feels like they’re prioritising my uncle being able to make these jokes over me not getting upset.

But then again, maybe the fact I was in a bad mental state/having a tough time is leading me to look too deep into the situation, or maybe I generally shouldn’t have snapped at him in the restaurant. I know what I think, but the fact that so many of my family members stuck up for my uncle over that situation has made me wonder if I’m just being too sensitive?