The best comedians can always pull it off because they know it’s about the focus of the joke. I have no idea who the original writer was, but there was a reddit thread about a cishet comedian who did
“You know how I know trans women are women? Because when we have sex they don’t finish either”
I love it. It’s a joke about trans people, but it works because the butt of the joke is the comedian himself… it even affirms trans identity.