Since it persists with sounds disabled and the sound disappears when increasing the computer's volume I think this may be related to your hardware. Something in your computer is probably causing interference in the sound circuitry. It's probably not related to Minecraft itself, but some versions just happen to create the exact right conditions for it to happen. Try using another audio port when available, or try a bluetooth or USB headset/speaker when possible. If it is due to interference then they shouldn't have that sound since they use digital signals.
You don't even need a firework to trigger this bug. Just look straight up while flying the elytra and you'll lose the connection to the internal server as soon as you start falling.
I don't think this is a duplicate of MC-23484. As I said in the description, this problem only occurs on the 2 most recent snapshots, only when running it with my nVidia graphics card, and it always happens a few seconds after the title screen has loaded. It does not happen at random moments.
In my case the game also does not crash, it freezes. Then after some time Windows detects it as not responding and closes it. The game does not close by itself.