This mod adds ability to lock your inventory slots preventing interaction with that item slot thus avoiding accidentally dropping said item
Screenshots and Videos
All downloads are available on CurseForge and Twitch Desktop App
CurseForge Link: https://minecraft.curseforge.com/projects/itemlocks
This mod requires Forge and is currently available on the following versions: 1.12.2 (Java 8)
The project will be closed source, but if you have any questions or issues, either send a DM on CurseForge or comment on the project link above.
Chances are I will miss your message if you commend on this post, though I will try not to.
Please note that this mod does not prevent loss of items upon death nor does it prevent servers from manipulating the content of locked slots!