### 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 sheet_offset_y_;
}
bool NativeWindow::IsTabletMode() const {
  return false;
}
void NativeWindow::SetRepresentedFilename(const std::string& filename) {}
std::string NativeWindow::GetRepresentedFilename() {
  return "";
}
void NativeWindow::SetDocumentEdited(bool edited) {}
bool NativeWindow::IsDocumentEdited() {
  return false;
}
void NativeWindow::SetFocusable(bool focusable) {}
bool NativeWindow::IsFocusable() {
  return false;
}
void NativeWindow::SetMenu(ElectronMenuModel* menu) {}
void NativeWindow::SetParentWindow(NativeWindow* parent) {
  parent_ = parent;
}
void NativeWindow::SetAutoHideCursor(bool auto_hide) {}
void NativeWindow::SelectPreviousTab() {}
void NativeWindow::SelectNextTab() {}
void NativeWindow::MergeAllWindows() {}
void NativeWindow::MoveTabToNewWindow() {}
void NativeWindow::ToggleTabBar() {}
bool NativeWindow::AddTabbedWindow(NativeWindow* window) {