The bug
The height of a shulker’s name tag name appears at a decent height when the shulker is closed. But when it’s open, the name tag is much too low, inside the mob.
In Bedrock Edition, the name tag rises dynamically to match the height of the mob as it opens. Java does this too for polar bears when they attack, just not shulkers.
Can confirm as of 26.1-snapshot-7
Also can confirm that polar bears names rise when they attack in java edition.