Weird. So the board getting generated again somehow cancelled out the game over screen from appearing. That's only thing missing in that scenario, the enemy behaviour is just as it should be after the player is dead. Did you try esc + quit, that should still save your score?