As I had alluded to a few paragraphs ago, this is actually caused by a boss fight from an earlier stage. The fourth stage boss consists of a twin boss fight with two phases. During the first phase, you must fight both of them at once. When you defeat one, you have to fight the second one solo with stronger attacks. However, what's important for this glitch is what happens during the first phase.
Here is a timestamp from the same video for reference:
Near the end of the first phase of the battle, Yuki and Mai will launch a series of homing lasers as part of their final attack pattern. (16:10 in the video). These lasers are what kills you in the encounter with the final boss. How? Notice that Jaimers defeats Yuki (the one wearing black) while the lasers are still on-screen. When those lasers are on-screen when Yuki or Mai is defeated, their hitbox is disabled, and they are flagged to be immobile and invisible.
However, they are not erased from the game's memory. Once you encounter Shinki in the sixth and final stage, and the cutscene with her ends, those lasers will
reactivate, with their hitbox reenabled and mobile once more. If at this point you collide with these (now invisible) lasers,
you will die.
I want to emphasize that this game originally came out in 1998, and this video was uploaded in 2018. That means that this glitch was a total mystery for about
twenty whole years.
I guess the moral of this story is "Friends don't let friends program drunk."