Easy way to pass input/mouse position to RenderTexture UI Documents? (Input System)

For future reader, you can find a good sample here : Handling pointer events on render texture

It shows how to use PanelSettings.SetScreenToPanelSpaceFunction() and gives an implementation to get the UI space pointer position from a raycast on a 3D mesh.