When using the /item command to replace an item in the player's inventory in a repeating command block, if the item is thrown away or placed by the player, the item will not visually reappear in the player's inventory, though it still physically exists.
Linked issues
duplicates 1
Comments 4
https://www.youtube.com/watch?v=5ZPdcYXwDu4
There's a link to a (slightly bad quality) recording of what I mean
Duplicate ofย MC-219018, which was has been fixed in 1.17.1 Pre-release 1.

Thank you for your report!
We're tracking this issue in MC-219018, so this ticket is being resolved and linked as a duplicate.
That ticket has already been resolved as Fixed. Please check the Fix Version/s field in that ticket to see in which version this behavior was or will be fixed.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
๐ Bug Tracker Guidelines โ ๐ฌ Community Support โ ๐ง Mojang Support
๐ Project Summary โ โ๏ธ Feedback and Suggestions โ ๐ Game Wiki
-- I am a bot. This action was performed automatically! The ticket was resolved by one of our moderators, and I left this message to give more information to you.
Please provide some screenshots or videos of this issue occurring whilst the F3 debug screen is enabled.