Gamma-ray bursts are thought to be correlated to supernova or hypernova eruptions.
In 1987 there was a prominent supernova eruption called SN1987A
at a distance of $168000$ light-years (in the Large Magellanic Cloud,
a small neighbor galaxy of our Milky Way).
The article "Determining the jet opening-angle of gamma-ray bursts"
sugggests this supernova had also emitted a gamma-ray burst
(which obviously was not directed to us).
And they estimate its opening angle to be around $6°$.
Therefore its gamma-ray burst, if it would have been directed to us,
when hitting us would have been spread out to a diameter of around
$17000$ light-years.
This is much larger than the size of our solar system (a few light-hours).
And anticipating your next likely question: Supernovas near enough
to harm us by its gamma-ray burst are extremely rare.
There is just one such event in geological time
(the mass extinction 440 million years ago)
which may have been caused by a gamma-ray burst.
See the article "Did Gamma Rays Cause Ordovician Mass Extinction?".