The code in InventoryUIController.OnPointerUp calls to closestSlot.HoldItem first then call m_OriginalSlot.DropItem. This would remove the item if closestSlot happens to be same as m_OriginalSlot.
//Set the new inventory slot with the data
closestSlot.HoldItem(GameController.GetItemByGuid(m_OriginalSlot.ItemGuid));
//Clear the original slot
m_OriginalSlot.DropItem();