How do I implement a drag and drop in a widget?

Also, if it’s on the trash bin, does it mean it’s a replacement for the other border?

You can use the existing border in the widget representing where the garbage is supposed to go:

In short: in order to display an animation, the dragged widget needs a new parent (otherwise it will play in the old parent, where you dragged it from). There are other ways of doing it but that’s the most straightforward and reasonable.