Mark items as dragging before updating inventory state to prevent the spawner from destroying containers mid-drag. Move inventory removal to drop time for lost items, and add guards to ignore stale pointer events on inactive containers.