Funny in W.W.II The Japanese fighters shot 20mms into B-29 s and they did not blow up Just made the air inside leak out faster. And now there are handguns bigger than that now. I must have missed those.
It is possible for a handgun to cause explosive decompression. But it would need to hit a window. AND cause it to blowout. and this would not cause the plane to go down. Just everyones ears to pop. Aircraft have had this happen in flight. And have landed safely landed.
One of the tests they do when designing a craft is to shoot large harpoons about 5 ft across in to the pressurized fuselage to see that it dont blow up.