Mars however is very cold, highly radioactive, practically no atmosphere, and vulnerable to meteor strikes. So to fix all those problems inhabitants would likely be under 1 meter to minimize air leakage, radiation, heat leakage, etc. So it might well be that 99% of people survive a 1M deep sterilization ... only if self sufficient, which does seem a stretch, at least for the next century.
One example is infrared which we sense as warmth. I am somewhat fuzzy here, but I imagine that these photons bump into the atoms of our skin such that they tend to shake more vigourously than before. This is heat.
I can imagine that gamma rays of a gamma ray burst are plentiful and hard enough to influence the tardigrade matter to an extent to even kill tardigrades.
This said I see a way how tardigrades could survive a gamma ray burst. They are inside an asteroid or even inside a Mars-like planet. Even if the gamma rays ablate a significant chunk of the crust, enough will remain to protect the tardigrades.
So some tardigrades might be lucky to survive a gamma ray burst nearby.
Just speculating here.