I killed myself using /kill @p while having a shulker box in survival with cheats enabled, the item was a cursed diamond chestplate. when i got back, the item was still in the shulker box instead of vanishing like it should. keepinventory was also false.
Well... i see some things that might invalidate this:
1. It is still technically in a container, therefore you didn't drop it you dropped the container
2. Fixing it to remove the item from the box would cause tremendous amount of lag on servers with hundreds to thousands of people(otherwise they would just not let the item in boxes).
3. this could also affect chests. making the item have to be on you at all times or it would disappear.
4. and i'v heard that you have to drop the item and as i stated before, 'It is still technically in a container, therefore you didn't drop it you dropped the container'
now unless the devs think otherwise i think its acting as it should and was intended.