I don’t think it is a bug, the enemy king can’t move back to X because the knight is attacking that space. Traditionally you can’t move into check in chess.
Good. This is one step to stop the future from looking like that Internet Archive thing they did for their 25th anniversary: https://wayforward.archive.org/ia2046/.