Why are you removing the widget from its parent if it’s already inside wb_hud? Just leave it where it is. Remove all the RemoveFromParent and AddToViewport nodes and just move the widget to where it’s supposed to go.
Now, if the drag operation changes the parent during the dragging, then you’d need to store the original parent before it is changed so you can restore it during the OnDrop function. But you still wouldn’t call AddToViewport.