Playing with Functional Storage 1.2.10 and Pocket Storage 1.0.4-build.28 for Minecraft 1.20.1 on Forge I found that when I sneak-click a drawer from the mod "Functional Storage" with a Pocket Storage Unit, items that do not fit in the Pocket Storage Unit anymore will just be voided as if they had been picked up from the ground.
I assume that there are quite a number of blocks from different mods that have similar mechanics, so introducing a "grace period" for the automatic voiding of excess items after a tile entity has just been clicked, or something similar to this, might be a good idea.