<!--  As an open source project with a dedicated but small maintainer team, it can sometimes take a long time for issues to be addressed so please be patient and we will get back to you as soon as we can.
-->

### Preflight Checklist
<!-- Please ensure you've completed the following steps by replacing [ ] with [x]-->

* [x] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/master/CONTRIBUTING.md) for this project.
* [x] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md) that this project adheres to.
* [x] I have searched the issue tracker for an issue that matches the one I want to file, without success.

### Issue Details

* **Electron Version:** v10.1.4
  * <!-- (output of `node_modules/.bin/electron --version`) e.g. 4.0.3 -->
* **Operating System:** MacOS Big Sur
  * <!-- (Platform and Version) e.g. macOS 10.13.6 / Windows 10 (1803) / Ubuntu 18.04 x64 -->

I created a full repro here: https://github.com/ccorcos/electron-browser-view-bounds

```
git clone git@github.com:ccorcos/electron-browser-view-bounds.git
cd electron-browser-view-bounds
npm install 
npm start
```

You can also view the repro example here: https://github.com/ccorcos/electron-browser-view-bounds/blob/main/example.mov

Basically we can resize the view with the window using `view.setAutoResize({ width: true, height: true })` or manually with: 
```
  mainWindow.on('resize', () => {
    const [width, height] = mainWindow.getSize()
    view.setBounds({ x: 0, y: 0, width, height })
  })
```

And the view does properly resize, but the mouse event capture region that gets passed on to the view remains the same size and fits into the bottom right region of the window.

### Screenshots
<!-- If applicable, add screenshots to help explain your problem. -->

### Additional Information
<!-- Add any other context about the problem here. -->

shell/browser/api/electron_api_browser_window.cc
*width = web_contents()->GetPreferredSize().width();
}
void BrowserWindow::OnCloseButtonClicked(bool* prevent_default) {
  
  
  
  *prevent_default = true;
  
  
  
  
  if (window_unresponsive_closure_.IsCancelled())
    ScheduleUnresponsiveEvent(5000);
  if (!web_contents())
    
    return;
  
  api_web_contents_->NotifyUserActivation();
  if (web_contents()->NeedToFireBeforeUnloadOrUnloadEvents())
    web_contents()->DispatchBeforeUnload(false );
  else
    web_contents()->Close();
}
void BrowserWindow::OnWindowClosed() {