You would need to setup two cameras in your scene - a perspective camera for the game view and an orthographic camera for the GUI.
The perspective camera should have a depth smaller than the ortho and the ClearFlags should be set to Skybox or Solid Color to clear the background.
The ortho camera would of course have a depth greater than the perspective camera (meaning it should be rendered after the perspective) and the ClearFlags should be set to Depth Only or Don’t Clear - depending on your specific scene.
Something else to consider would be to place all your GUI objects into their own layer and exclude the layer from your perspective camera’s Culling Mask, and set it as the only layer in the Culling Mask your ortho camera.