How to change the resolution on a X or Y axis witouth having a scaling issue?
The apparent inconsistency is due to the camera Sensor Size being set to 'Auto'.

When set as 'Auto', Blender will use the specified sensor Size as the size of the longest edge of the sensor - and in your example this will correspond to the largest of the X and Y resolution. This means that whichever dimension is the largest will dictate the effective size of the sensor and this (in conjunction with the Focal Length) determines the view from the camera - hence the change in behaviour when the X dimension crosses the threshold of the Y dimension in your example.

The solution is to change the Sensor settings to Horizontal or Vertical. This locks the 'Size' to correspond to that specific axis.