Even if all that happened, underground bases would be protected, as would above-ground or in-space habitats that happened to be protected either by the mass of the body they're on by virtue of 'facing away' from the GRB; or by virtue of being behind another body (e.g. Jupiter, the sun, some body they are orbitting) relative to the GRB. With space habitats, they may also be protected by virtue of already needing some level of protection against cosmic radiation; but that's highly speculative.
A GRB also wouldn't destroy the Earth. It would do a lot of damage to its ecosystems, but the Earth would be relatively safe again not terribly long after the event, even without human intervention. If we had the technology to colonize space, we could definitely recolonize the Earth, even in a worst case scenario where the entire ecosystem collapses.
Granted, this doesn't cover bigger black swan events like gamma ray bursts, where the entire solar system is screwed, but it'll at least help with Earthside apocalypse.
The fact that we couldn't handle it is indeed incriminating against our abilities as a species, but as they say, perfect is the enemy of good.