Screen.width /height not working as intended

When i try to use Screen.width / height, it returns the width of the scene view, and not the game view.
Logically, i need the values for the game view.
Can anyone help?

Edit: I figured it out. I called Screen.width in onDrawGizmos(), which takes the scene view and not the game view for some weird reason

In the game view select one of the preset resolution / or add your own. at left where Free Aspect is selected