### 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
if (!window->transparent() || !ui::win::IsAeroGlassEnabled())
    return size;
  gfx::Size min_size = display::win::ScreenWin::ScreenToDIPSize(
      window->GetAcceleratedWidget(), gfx::Size(64, 64));
  
  
  gfx::Size expanded(std::max(size.width(), min_size.width()),
                     std::max(size.height(), min_size.height()));
  return expanded;
}
#endif
}  
NativeWindow::NativeWindow(const gin_helper::Dictionary& options,
                           NativeWindow* parent)
    : widget_(std::make_unique<views::Widget>()), parent_(parent) {
  ++next_id_;
  options.Get(options::kFrame, &has_frame_);
  options.Get(options::kTransparent, &transparent_);
  options.Get(options::kEnableLargerThanScreen, &enable_larger_than_screen_);
  options.Get(options::kTitleBarStyle, &title_bar_style_);
  v8::Local<v8::Value> titlebar_overlay;
  if (options.Get(options::ktitleBarOverlay, &titlebar_overlay)) {