### 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 feature request that matches the one I want to file, without success.

### Electron Version

14.0.1

### What operating system are you using?

Windows

### Operating System Version

Windows 10 19042.985

### What arch are you using?

x64

### Last Known Working Electron version

_No response_

### Expected Behavior

1) no crash should happen
2) I would expect both the browserWindow and its webContents to have isDestroyed set to true

### Actual Behavior

```
browserWindow.webContents.on("destroyed", ( ) => {
  console.log("isDestroyed", browserWindow.isDestroyed(), browserWindow.webContents.isDestroyed());
  browserWindow.close();
});
```

This will cause a crash
Additionally the log will show: isDestroyed false true
Is this expected behavior? I thought that the window and the webContents are related to each other

### Testcase Gist URL

https://gist.github.com/t57ser/319bcb4e6e71e6097094e46db526fae7

### Additional Information

_No response_
shell/browser/api/electron_api_browser_window.cc
web_contents()->WasOccluded();
  BaseWindow::OnWindowHide();
}
gin_helper::WrappableBase* BrowserWindow::New(gin_helper::ErrorThrower thrower,
                                              gin::Arguments* args) {
  if (!Browser::Get()->is_ready()) {
    thrower.ThrowError("Cannot create BrowserWindow before app is ready");
    return nullptr;
  }
  if (args->Length() > 1) {
    args->ThrowError();
    return nullptr;
  }
  gin_helper::Dictionary options;
  if (!(args->Length() == 1 && args->GetNext(&options))) {
    options = gin::Dictionary::CreateEmpty(args->isolate());
  }
  return new BrowserWindow(args, options);
}
void BrowserWindow::BuildPrototype(v8::Isolate* isolate,
                                   v8::Local<v8::FunctionTemplate> prototype) {
  prototype->SetClassName(gin::StringToV8(isolate, "BrowserWindow"));
  gin_helper::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate())
      .SetMethod("focusOnWebView", &BrowserWindow::FocusOnWebView)
      .SetMethod("blurWebView", &BrowserWindow::BlurWebView)
      .SetMethod("isWebViewFocused", &BrowserWindow::IsWebViewFocused)
      .SetProperty("webContents", &BrowserWindow::GetWebContents);
}
v8::Local<v8::Value> BrowserWindow::From(v8::Isolate* isolate,