Sorry about that! 😳
The mechanics for the teleport are are shared with the Imp and only works for actual floor tiles, so they cannot leave the game space.
I just checked the code though and it could be possible that a spike killed the King, which would result in not triggering the end sequence. :/