How could i hide the mouse using the new InputSystem?

cause Cursor.visible is not working when using the new Input System

Are you sure you used the Cursor keyword properly? It does not always work in the Unity Editor as you need to control the Unity Editor itself, better to test it out in build.