### Preflight Checklist

- [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success.

### Electron Version

17.0.1

### What operating system are you using?

macOS

### Operating System Version

12.1

### What arch are you using?

arm64 (including Apple Silicon)

### Last Known Working Electron version

16.0.9

### Expected Behavior

When setting `maxWidth` but not a `maxHeight`, I expect the window to resizable in the y direction.

### Actual Behavior

Unable to resize window in y direction. Also, removing `minWidth` to allow window to shrink, causes stuttering and mac's beach-ball cursor to show.

### Testcase Gist URL

https://gist.github.com/eab3c4ec605b8b942cece3d05e7f749c

### Additional Information

_No response_
shell/browser/native_window.cc
options.Get(options::kUseContentSize, &use_content_size);
  
  extensions::SizeConstraints size_constraints(
      use_content_size ? GetContentSizeConstraints() : GetSizeConstraints());
  int min_width = size_constraints.GetMinimumSize().width();
  int min_height = size_constraints.GetMinimumSize().height();
  options.Get(options::kMinWidth, &min_width);
  options.Get(options::kMinHeight, &min_height);
  size_constraints.set_minimum_size(gfx::Size(min_width, min_height));
  int max_width = size_constraints.GetMaximumSize().width();
  int max_height = size_constraints.GetMaximumSize().height();
  options.Get(options::kMaxWidth, &max_width);
  options.Get(options::kMaxHeight, &max_height);
  size_constraints.set_maximum_size(gfx::Size(max_width, max_height));
  if (use_content_size) {
    SetContentSizeConstraints(size_constraints);
  } else {
    SetSizeConstraints(size_constraints);
  }
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
  bool resizable;
  if (options.Get(options::kResizable, &resizable)) {
    SetResizable(resizable);
  }
  bool closable;
  if (options.Get(options::kClosable, &closable)) {
    SetClosable(closable);
  }
#endif
  bool movable;