let me try walking you through this in a different way that will hopefully make the issue of stacked shots more clear to you and why introducing an iframe grace period won’t help with simultaneous shots:
time passes on a tick-based system, every time we hit a tick we re-evaluate what’s happening in the “present” and make adjustments accordingly. so in the scenario of getting hit normally, the projectile moves across the screen and asks if its touching something every time we pass a new tick. on the tick when it finally does make contact with your character, the game calculates how much your HP should go down based on your DEF and the projectile’s damage, and makes changes to your HP to match. the key point here is that this change does not happen on the same tick that the projectile hits you. that tick that you got hit on has already happened, we can’t go back in time to previous ticks so any changes we make happen on the next tick.
now consider 30 shots all making contact with your character on the same tick, with an iframe system that should make you invulnerable briefly after getting hit. in that tick, all 30 shots will pass the “am I hitting something” test, so the game applies the corresponding damage for all 30 shots. now whichever one happens to get chosen to be added first will trigger the iframe system, but because this tick has already happened we won’t get those iframes until we get to the next tick. meanwhile in this snapshot in time the player racks up major damage from all those shots at once because they haven’t turned on their iframes yet. when we finally get to the next tick after all those shots have hit, your iframes have activated and you’re temporarily invulnerable, but you’re also dead because your HP is now -400. iframes won’t save you from stacked shots.
in fact, you don’t even have to take my word for this. this has actually happened already using the alien armor effect. going invulnerable doesn’t take effect until we reach the next tick because we can’t change things that have already happened, and going invulnerable won’t stop you from dying if you’re already dead.