Keep frame position after exiting UIGridLayout

Hello all, I am making a drag and drop inventory system. The issue I face is that I don’t know how to keep the position of a frame after exiting UIGridLayout. You can see the hierarchy and the position when the frame is inside the grid and when it’s outside.

image

The frame get’s moved from Inventory > InventoryFrame > Items to Inventory > InventoryFrame. Why does it change position like this and how could I make it stay the same position as it was in the grid after I unlink it from to grid. Happy to answer more questions.

Once the mouse is up parent it back to the Items frame.

I cant because I need it to be parented to InventoryFrame while mouse is up as The dragging module wont work inside a UIGridLayout. So back to The question How could I make The frame stay The same position while changing The parent?