Shulkers have an attribute modifier that increases their minecraft:armor attribute by 20 when they are closed, but not immediately after they spawn as closed; they have to open once and then close again to be given the modifier.
Note that this is different from MC-272887, since shulkers with NoAI are never given the modifier, even if they are forcibly opened and closed using commands.
How to reproduce:
Summon a shulker.
Before the shulker opens up for the first time, execute the following command:
/attribute @n[type=minecraft:shulker] minecraft:armor modifier value get minecraft:covered/attribute @n[type=minecraft:shulker] minecraft:armor modifier value get minecraft:covered→ ❌ The attribute modifier doesn't exist.
Expected result:
The shulker is closed, so it would have 20 innate armor points.
Observed result:
The shulker doesn't have any armor points despite being closed.
Issue can be reproduced more easily if you run
/tick freezebefore spawning the shulker.