Hold filled shulker box in offhand (can be single items or stacks).
Open in inventory
Mouse over any item stack and press "F" to switch to offhand. A duplicate of the original shulker box will appear inside your shulker box, though the stack you removed will vanish, as you will also still be holding the shulker in your offhand.
(optional) Repeat step 3. Doing so will duplicate the current shulker, with a shulker inside, into the next slot. Can be continued for an exponential growth curve of nested shulkers. Doing so too many times will cause playerdata to exceed file size limit, and lock player out of server.
Place the offhand shulker on the ground. This will allow you to retrieve any duplicate shulkers from inside. All shulkers will have the original items, duplicated.
This was discovered by accident by one of the players on my server, who then proceeded to lock himself out of the server as aforementioned. Let me know if you have more questions.
Running v4.3.1 on Paper 1.19.2
to recreate:
This was discovered by accident by one of the players on my server, who then proceeded to lock himself out of the server as aforementioned. Let me know if you have more questions.