you need to use layerToCanvas() and canvasToLayer().
These formulas will be something like this:
CanvasToLayerX("Layer2", LayerToCanvasX(CursorSprite.LayerNumber, CursorSprite.X, CursorSprite.Y), LayerToCanvasY(CursorSprite.LayerNumber, CursorSprite.X, CursorSprite.Y)
CanvasToLayerY("Layer2", LayerToCanvasX(CursorSprite.LayerNumber, CursorSprite.X, CursorSprite.Y), LayerToCanvasY(CursorSprite.LayerNumber, CursorSprite.X, CursorSprite.Y)
there's also this suggestions to make these calcualtions easier:
https://construct23.ideas.aha.io/ideas/C23-I-71