As someone who dabbles in stand up, to the best of my knowledge, there are no limits on what a comedian could say beyond the normal limits on speech (threats, defamation, etc).
That being said, your job is to be marketable. If what you say causes people by and large to dislike you, then you're not doing your job very well. And it is perfectly reasonable that people may not want to work with you.
In the end its about putting asses in the seats. You can say pretty much whatever you want as long as you can still accomplish that. George Carlin, Joe Rogan, Dave Chapelle, Bill Burr, Louis CK... all of them upset a whole bunch of people. Still all getting well paying work. I mean... aside from George Carlin. For all the concern about it, I'm not sure I recall anyone being actually "canceled" unless they do some Cosby level shit.