The batteries have a higher specific heat capacity than the heatshrink and the heatshrink should shield the hot air from the PCB while it is not tight. So don't keep pointing the heatgun at it once the heatshrink has closed around the battery and don't point the heatgun at anything until it has warmed up. Heatshrink will also continue to shrink a bit after you remove the heatgun since it will still be hot, just not as fast so you can actually remove the heatgun early.
You also don't have to point the heatgun continuously at it the whole time. Once the heatgun is warmed up you can quickly wave it around and remove it and watch the heatshrink shrink a bit and come back again at it.
If you're worried, get a block of aluminum or steel and heatshrink it. When you're done measure the temperature of the metal and see how you did. Cut it off with a knife, then try again. Don't rely on the actual temperature number since the thermal mass will be different than your batteries, but it will give you an idea of how much you are heating up the heatshrink versus the stuff under it.