Minecraft wiki entry for Defeating_an_End_city, associated text: If the shulker teleports out of sight, the battle is essentially complete because the shulker cannot attack anymore. If you happen to encounter the same shulker later, you can finish it off and collect the shell.