Mousepos on local rectangle

Hello,
i have a script which needs to know the mouseposition on the rectangle it is assigned to.

so i have here:

            Vector2 localCursor;
            if (!RectTransformUtility.ScreenPointToLocalPointInRectangle (newmap.GetComponent<RectTransform> (), Input.mousePosition, go.maincamera, out localCursor)) {

            }
            mousedebug.transform.localPosition = localCursor;

While this seems to follow the mouse there are some issues:
Sometimes it seems to ignore the position in “stripes” and when i move out of the “stripe” the mousedebug prefab jumps.
Also it seems to be not on the mouse but above it or beside it.

Is there an other way to get the mouse position? With this the mouseposition still sometimes gets stuck in either the x or y coordinate.

I looked a bit more into it it seems that my galaxy layer does work properly but my system layer does break the mouse function. Funny is however that both are instantiated from the same prefab.