This is frustrating, but the solution Dan suggested will help you get past it. Do not drag items from inventory to the hot bar, drag items from the hotbar to inventory, this works every time (on PC, I don’t know about other platforms).