> On Mars its effect would be largely inconsequential.
No.
A GRB strong enough to reduce Earth's ozone layer by half, would be about 100 kJ/m^2:
https://ntrs.nasa.gov/api/citations/20050179464/downloads/20...
On Mars, where there's no ozone layer in the first place, and the atmosphere is much thinner, and there's no magnetosphere, IIRC just over half the radiation from a GRB reaches the ground.
Given a human cross-sectional area from above is about 0.25 m^2, that means that a human outside during such an event would get 25 kJ almost entirely absorbed by their body.
A lethal dose for a 100 kg human is about 1 kJ absorbed. And when I say "lethal", 1 kJ absorbed is 99%+ lethal within 2-14 days, even with immediate treatment, and the victim suffers rapid incapacitation due to CNS failure.
You'd need to bury everyone under, IIRC, 2-3 meters of regolith to protect against that. You'd also need your crops underground for the same reason. If you're going to all the trouble to have a farm functioning under several meters of soil, you can also do the same things needed for that, on Earth, far more cheaply.
Furthermore, the nitrogen dioxide levels expected in such an event, would reduce Earth surface sunlight levels by 10-60%. Mars, just by being further from the Sun, gets a reduction of 48-64% (varies over the Martian year) relative to Earth — even when there's no planet-spanning dust storms, which it also gets.