So you place a shulker egg or bring it from the end. You then place a piston facing the shulker. Place a block ontop of the piston. Then, (when the shulker shell lowers down a bit) you place a sand block above the shulker by tapping/clicking the block that you just placed. Then place a lever on the piston and power it. The piston head will go right through it and the shulker won't teleport away like normal!