When the /give command is run for an item immediately after it is dropped, the item does not appear in your inventory until it is updated again by looking in a cheat/clearing again.
To reproduce, create a data pack with a function running under the tick.json tag. Inside, have it give an item to any player that does not have the item. See attached data pack for example.
Environment
Java (build 1.8.0_281-b09)
Windows 10 Home
Linked issues
duplicates 1
Attachments
Comments 3
I believe this ticket is a duplicate of MC-219018 which was fixed in 1.17.1 Pre-release 1.
Can confirm in 21w13a. Relates to MC-219018.