In military systems it's done with e.g. frequency hopping with encrypted sequences. That's also how GPS anti-spoofing works (that's for the military segment of GPS). The idea is say there are 1000 frequencies and you keep switching between them. Since the jammer doesn't know which one you're using at any moment, they have to jam all 1000 of them. So that increases their power requirements by 1000x compared to jamming just one frequency.
It's not feasible for a mass market consumer product like Starlink. Even if it was, it would be thrown under sanctions or military suppression faster than you can say boo. And it would run at quite low bit rates to again maximize the ability to get through jamming. It would be useless for Netflix or transmitting video.
Maybe an activist cell in a place like Iran could put something together for its own members on the quiet, but it would be low bandwidth and would presumably be very dangerous for the users if they got caught. It seems likely to be that low bit rate digital ham radio modes like PSK4 or JS8CALL could get through Iran's jamming, and the hardware is pretty accessible. But, they could use direction finding to clobber the transmitters. Low bit rate = 1 character per second, say. So you could essentially smuggle text messages out of the country, not video. Maybe if they aren't looking, you could get a voice channel through. On the other hand, is it possible to make phone calls in or out of Iran right now? I doubt that the country would disconnect itself completely enough to stop all phone calls, but I haven't been following the situation. I think it's possible to even call into North Korea though.
I wonder sometimes if people overestimate the usefulness of stuff like this. Suppose Iran's efforts to jam Starlink had failed, so Starlink still worked there. What would be different for anyone? We'd see more video getting out, but it's not clear to me that it would have any effect other than to stoke up more internet rage. It's unclear to me if that's of any help any more.
Starlink was apparently believed to be unjammable until recently, when we found out that it wasn't, fwiw.