I’m assuming “Default is Native Resolution” is checked for you, but these options in Build Settings > Player Settings > Resolutions , are most likely the culprit.
If you want to change this with code at runtime rather than settings I suggest using Screen.SetResolution() in an awake or start method.