I'd suggest that you do it in two parts:
1) Instead of moving the mouse, have the user click inside a starting block to initiate the maze. That way, you're avoiding doing that which I don't think anyone would actually appreciate (moving their mouse), and you've basically worked around the issue (which I don't think is possible in C2; maybe there's a plugin that can be coded to do it though).
2) Once the maze has begun (i.e., the player has clicked in the starting area), set an action to change the mouse cursor to a sprite (Mouse -> set cursor from sprite) which can be your square or whatever you want. This effectively hides the mouse cursor when it's inside the game window. You can then set up an invisible block to follow Mouse.X and Mouse.Y at every tick, which is actually used to detect collisions with the maze walls.