I’m no aviation expert by any means, but I have always been under impression that a bullet breaching a cabin at altitude would depressurize the cabin, and/or the cockpit.
But if you are into this kind of thing, I would be interested to know more.
You need a very large hole to depressurize a cabin that size.
Pressurization in an airplane is actually negative pressure.
That is, more air is pumped in to create an equal pressure within the cabin than escapes.
An airplane isn’t leak proof before a bullet hole. It actually leaks through several areas such as seams.
Now, if you open a hole the size of a door the pressurization isn’t going to work at all.
MythBusters did it. IIRC, the masks might drop, but the plane wouldn’t have a huge hole in the side sucking people out.