Alright so i watch back some runs to see if i could figure out what activates the Invincibility Glitch and i think ive got it. so im almost certain it has to do with going through a door after you got hit and have Invincibility frames as every run ive looked at has gotten hit at the room after you get the sword (the one with the two snails), and go through the door when they have Invincibility frames (also if you die by falling in water or falling off a cliff you lose the invincibility glitch) I'll have to do some testing to see if its only that door, or if you can do it everywhere.
so a small update, ive had a few runs where the glitch just stops working for whatever reason and i think i found 2 reasons why it might be happening. Getting hit by a rock thrown by a mole, or picking up health dropped by enemies. not 100% sure if these are what is causing it to stop but its the only things that would have made sense.