Dragging items already on your hotbar into open space or to your inventory menu does not remove it from that slot. The game only allows you to override the slot with a new item by dragging another on that spot.
Perhaps this isn't a bug but it makes using the system a little bit harder once your hotbar is fully filled with items.
I suggest that:
- shift clicking an item on a hotbar will remove it from that spot (in creative mode)
- dragging an item from the hotbar to empty space/inventory menu/anywhere else also removes it from that hotbar slot.