Normally, when using the playerInventoryItemChange world after event, hooks are fired whenever an item changes in the user’s inventory. This does not occur in at least one known case: when the hotbar is full and the block being picked is in the inventory but not the hotbar.
Demonstration
The attached video demonstrates this issue. A log is supposed to be fired on every player inventory item change, but is not when the above situation occurs.
Reproduction
This example is taken from the packs in the attached world for convenience. This world can be opened (in Minecraft Preview) for inspection or unzipped to access the code associated with such. Ensure content logs are enabled with at least warn severity to see script outputs.
Thank you for helping us improve Minecraft! We saved your files: