Click events not working when the mouse cursor is shown

What I’m trying to do is have the player be able to freeze the camera so they can use the mouse to click an object in the game.