It’s derogatory and meant as so as quite a few descriptions of the goyim are
It can pass in comedy maybe in proper context
Yiddish is not a warm and endearing tongue
It can be coarse and yes funny
No accident so many great comedians once knew it
I miss those guys
Maybe it is derogatory at that. Yiddish developed in an environment where it was necessary to keep some communications secret from the gentiles in a room, because they were liable to take offense easily and were inclined to violent reprisals. Same with a lot of black slang. Probably the same way Romani developed among Gypsies. “Shiksah,” however, can go either way depending on the context. “He ran off with a shiksa” would be derogatory. Saying to your secretary with whom you’re on friendly terms, “Shiksah, could you bring me some coffee on your way back from lunch,” is more affectionate and familiar, a sort of a joke, if she puts up with it. It’s a very flexible language. There’s now a course in it on Duolingo.