When you open the chest UI, and hover the cursor with a stack, I would expect the drop item key (z) to drop a single item into the chest. Instead z drops the item on the ground behind the chest UI.
I am aware that right click also drops a single item. But for consistency, z should work too.
Drop item key doesn't work in chest UI
Re: Drop item key doesn't work in chest UI
That is not a bug, "z" specifically does not interact with inventories, its drops the item and what happens to it depends on the entity it lands on.