### Preflight Checklist

- [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](https://www.github.com/electron/electron/issues) for a feature request that matches the one I want to file, without success.

### Electron Version

12.0.5

### What operating system are you using?

Windows

### Operating System Version

Windows 10

### What arch are you using?

x64

### Last Known Working Electron version

_No response_

### Expected Behavior

According to the doc [`BrowserWindow.getAllWindows`](https://www.electronjs.org/docs/api/browser-window#browserwindowgetallwindows): Returns `BrowserWindow[]` - An array of all opened browser windows. I expect that behaviour always.

### Actual Behavior

In the [`window-all-closed`](https://www.electronjs.org/docs/api/app#event-window-all-closed) event handler the `BrowserWindow.getAllWindows` is not empty, it returns the closed window.

Note: when running inside Electron Fiddle, the `console.error` from the `window-all-closed` does not appear in the Fiddle's console when the app quits. It appears in the Fiddle's console when you Run the app again.

### Testcase Gist URL

https://gist.github.com/8b63d0581b49793ce8bdddfe0aecaed3
shell/browser/native_window.cc
return widget();
}
std::u16string NativeWindow::GetAccessibleWindowTitle() const {
  if (accessible_title_.empty()) {
    return views::WidgetDelegate::GetAccessibleWindowTitle();
  }
  return accessible_title_;
}
void NativeWindow::SetAccessibleTitle(const std::string& title) {
  accessible_title_ = base::UTF8ToUTF16(title);
}
std::string NativeWindow::GetAccessibleTitle() {
  return base::UTF16ToUTF8(accessible_title_);
}
int32_t NativeWindow::next_id_ = 0;
void NativeWindowRelay::CreateForWebContents(
    content::WebContents* web_contents,
    base::WeakPtr<NativeWindow> window) {
  DCHECK(web_contents);
  if (!web_contents->GetUserData(UserDataKey())) {
    web_contents->SetUserData(UserDataKey(),
                              base::WrapUnique(new NativeWindowRelay(window)));
  }
}
NativeWindowRelay::NativeWindowRelay(base::WeakPtr<NativeWindow> window)
    : native_window_(window) {}
NativeWindowRelay::~NativeWindowRelay() = default;
WEB_CONTENTS_USER_DATA_KEY_IMPL(NativeWindowRelay)
}