Sometimes family thinks they can say anything without consequences. In my experience, you have to set a firm boundary with them the same way you would anyone else. It's okay to take a big step back from someone who disrespects you, cousin or not.
Family can be the hardest to draw lines with. My uncle always joked about my life choices at holidays, so I skipped Christmas last year. Sometimes you have to show people their words have a real cost. It's not easy, but your peace matters more than their comfort. Why let someone keep hurting you just because you're related? Taking a break from family drama can make a huge difference.