I used to slip in to a bit where I was sarcastically a character that took on beliefs basically the exact opposite of my own. I would make sexist or lightly racist (stereotype) jokes that I didn't actually believe but thought were funny. The jokes were ofter at the expense of myself or people like me but involved bringing up other races, sexes, and ethnicities.
I made an effort to stop doing this for a couple reasons. The first being that idk if I'm really good or really bad at sarcasm but a lot of people just wouldn't get my joke and I was afraid people actually believed that was who I was.
Secondly, I had a kid. I realized that she parrots everything I say and do, and she wouldn't understand the layers of the joke and could potentially become what I was making fun of.
I listen to a lot of comedians in podcast and I envy their ability to slip in and out of bits with other comedians knowing they all get it, but for now I make an effort to end that bit.