I think you still can attack them when they are in their shell, but you need to use a melee, You can't attack them with a bow when they're hiding in the shell though. Shulkers a pretty neat, I've seen them used for moving floors and parcour maps(not as an enemy though, more like a levitation boast)
Also, the're levitation attacks arn't that bad, if you have any of these three:feather falling boots, chourus fruit, elytra, then you won't take fall damage.
Edit: You want to know the bane of all minecraft players? It's the stupid pufferfish that shoot out laser beams of death, the worst part is that you can't shoot back at them well, also their giant pufferfish gives you mineing fatue, underwater... Great, now I can't swing my sword that quickly and I can't get the sponge and sea lantern I came here to gather! (If you don't understand mineing fatue, it makes you mine slower and it's litteraly impposible to mine anything underwater when you have it on)