When you spawn a shulker with a spawn egg on a non-solid block or a block less than a half blocks tall it spawns inside of it, always with an upward position.
If the block is one block wide, you can continue spawning shulkers. They will stack in the block above the first one until entity cramming.
for the best observation conditions:
-Make sure that the shulker can't teleport anywhere.
-Place a 1 block wide, non solid block or one less than a half block tall. A cobweb is a good one.
-Spawn a shulker with a spawn egg on the block. (it will appear inside of it)
-Continue spawning shulkers on the side of the block. (they will appear on top of it).
What is the expected behavior?