That is unrestrainable, due to how things are checked the enemies might have died but it was still “existing” when the game did the check to try to attack you.