Element is no longer attached to the DOM when performing drag and drop

Hi, when I am trying to perform a drag and drop functionality, after the first click on the element is done, seems like the DOM has changed, I am working in C# as follows:

void DragAndDrop(WindowsDriver driver, AppiumWebElement elementFrom, AppiumWebElement elementTo, int xOffsetFrom = 0, int yOffsetFrom = 0, int xOffsetTo = 0, int yOffsetTo = 0)
{
var elementFromCoordinates = elementFrom.Coordinates;
var elementToCoordinates = elementTo.Coordinates;

        driver.Mouse.MouseMove(elementFromCoordinates, xOffsetFrom, yOffsetFrom);
        driver.Mouse.MouseDown(null);
        driver.Mouse.MouseMove(elementToCoordinates, xOffsetTo, yOffsetTo);
        driver.Mouse.MouseUp(null);
    }

Does anyone have an idea how to solve this issue?

Thanks