Cursor Catch adds a second-click safeguard to vanilla Survival inventories and containers. If you click outside the window while holding an item on your cursor, the first click keeps the stack in place and plays a quiet sound. Click outside again with the same mouse button within 0.9 seconds to drop it normally.
Install on the client with Minecraft Java 1.21.1, NeoForge 21.1.267, and Java 21. No extra dependencies, keybinds, or settings.
This only covers mouse clicks outside vanilla container windows. It does not change the drop key, Creative mode, Spectator mode, Touchscreen Mode, or what happens when you close an inventory.