item stack duplication with Inventory
Steps to reproduce
1. Have 64 +1 of an item (needs to be 64)
2. Fill all of your inventory slots with any item
3. Throw the single item stack of the item you want to duplicate on the ground
4. Fill the remaining inventory slots with the item still on the ground
5. Stand on top of the single item on the ground and open your inventory
6. Click on the stack of the item and back out of your inventory at almost exactly the same time (make sure to click the item slightly before backing out buy like 50-100ms)
7. If the stack was replaced with the single item, and both stacks are in your inventory, back out of the world and rejoin, you will now have two stacks of that item, one will be stuck to your cursor. This will definitely take a few tries unless you're on a realm (Opening your inventory after both sacks were picked up will result in you having to start over)
NOTE: you have to get the timing right and it works best in the nether on a realm (not sure if the nether actually makes a difference but it seems to), it is very hard but still possible to do in a single player world.
unlisted video demonstration: Minecraft 1.21.30 inventory item duplication (youtube.com)