Minecraft wiki entry for Shulker_farming, associated text: When shulkers attempt to teleport, they use their current location to determining the scaffolding collision box test the validity of a particular spot. This means that there are certain setups that the shulkers can only teleport to from certain locations. Furthermore, since the relative position of the shulker changes after teleporting, the new location can suddenly appear invalid, and the shulker will immediately attempt to teleport away.