### 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
const std::string& item_id,
    const base::DictionaryValue& details) {
  for (NativeWindowObserver& observer : observers_)
    observer.OnTouchBarItemResult(item_id, details);
}
void NativeWindow::NotifyNewWindowForTab() {
  for (NativeWindowObserver& observer : observers_)
    observer.OnNewWindowForTab();
}
void NativeWindow::NotifyWindowSystemContextMenu(int x,
                                                 int y,
                                                 bool* prevent_default) {
  for (NativeWindowObserver& observer : observers_)
    observer.OnSystemContextMenu(x, y, prevent_default);
}
#if defined(OS_WIN)
void NativeWindow::NotifyWindowMessage(UINT message,
                                       WPARAM w_param,
                                       LPARAM l_param) {
  for (NativeWindowObserver& observer : observers_)
    observer.OnWindowMessage(message, w_param, l_param);
}
#endif
views::Widget* NativeWindow::GetWidget() {
  return widget();
}
const views::Widget* NativeWindow::GetWidget() const {