That or leaving your phone at home during protests. Of course, that won't help with automatic face recognition software that the Iranian authorities most certainly have set up in place already, but that's the rough deal of living in a tech-heavy society.
Or do phone + simcard swapping and use a higher level system for communication. So the mobile network as a whole becomes a communication channel where the mobile number itself is irrelevant. It’s only used as a mean to get on the network.
Havent give this too much thought yet but it could work.
That way Cellular Operators / Government can't see what you're doing (assuming VPN, no leaking, etc.) but they still can track where you are, very precisely, every second your phone is not in airplane mode or off. And with location, they know a LOT about you, potentially can infer identity at some point.
It could be done manually by swapping sims between each other and storing the phones in random places throughout the day/night e.g in a service apartment under an apartment block.
Still the way the government acts there this would probably just incriminate others who have nothing to do with their cause.
Spoofing your IMEI won't do much considering it's tied to your IMSI (sim card). You'd need a burner phone + burner SIM for actual anonymity.