When a shulker box is retextured to be animated, it works fine on the shulker box. However, this necessarily breaks the texture of shulkers of the same color. Since the texture is shared (
MC-108389) and mobs don't support animated textures, there is no way to avoid this.
Use the attached resource pack:
Animated Shulker Box.zip
Spawn a white shulker and place a white shulker box:
Minecraft 1.16.2 Pre-release 1 - Singleplayer 2020-07-29 21-16-48.mp4