The inventory_changed advancement criteria only runs when items are put into the player's inventory and not when the player puts items into a container such as a chest.
Steps to reproduce:
Make an advancement with the criteria
Make it reward a function that prints a message in chat (and removes the advancement)
Place an item into a chest, you'll notice that the advancement doesn't run
I don't see the issue here the containers aren't apart of the inventory. The video shows everything working fine you click on the item and it triggers at that point it isn't apart of the inventory anymore.