To survive a mass extinction from gamma-ray bursts, a smart species would build a self-sustaining subterranean city with 1 million humans in residence at any one time, perhaps rotating in and out on tours. I'm sure the Chinese will have one within 50 years even if no-one else does. And such subterranean cities are also likely how humans will be living on Mars for thousands of years before it's terraformed.
Well, my understanding could be wrong, but it seemed like the risk is to the ecosystem, not to human bodies directly. We personally don't need to be protected from the burst itself.