This is a tactic commonly used by men when they want a free pass for their racism/misogyny/homophobia and it takes various forms per the following:
“I was being sardonic.”
“I was being sarcastic.”
“I was just joking.”
“I wasn’t being serious.”
Yeah, okay. I see what you’re doing, dudes. You’re not only being incredibly transparent but using a tactic started by teenagers on the internet.