When using the hot-bar to put away an item if your backpack is full (but you have space elsewhere) the hotbar item will remove an existing inventory item to make free space. (While navigating a long distance I lost a very rare "Long Horn" pistol this way)
Suggestion:
Either search the complete inventory for a free slot
or
Have an in game warning that an item was dropped.