Idk if you can mark spoilers on itchio but there be spoilers here
You may already know this, but the knockback the 2nd boss applies to you when entering their 2nd phase can push you out of the boundaries of the game and get you stuck
I mainly play in the corners, so that's when it usually happened- camping the bottom left corner, hit the boss near a wall and they can just bounce you out