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

### Issue Details

* **Electron Version:**
  * v11.1.0
* **Operating System:**
  * –
* **Last Known Working Electron version:**
  * –
* **Place in code:**
  * [atom/browser/api/atom_api_top_level_window.cc:696](https://github.com/electron/electron/blob/5ae3d1a1b2dbe11d3091d366467591d9cb21fdfe/atom/browser/api/atom_api_top_level_window.cc#L696)
  * [atom/browser/api/atom_api_top_level_window.cc:709](https://github.com/electron/electron/blob/5ae3d1a1b2dbe11d3091d366467591d9cb21fdfe/atom/browser/api/atom_api_top_level_window.cc#L709)

### Expected Behavior

When `BrowserWindow#addBrowserView` got called, the BrowserView, passed as argument, receives new BrowserWindow and old BrowserWindow could be closed and has no control over BrowserView anymore.

### Actual Behavior

If BrowserView changes owner window (by `BrowserView#addBrowserView` call) and then old parent window closes, then BrowserView disappears from the new parent window.

### To Reproduce

```js
const {app, BrowserWindow, BrowserView} = require('electron')
const {once} = require('events')

async function main () {
  await app.whenReady()

  const width = 400
  const height = 300

  // Open two windows
  const win1 = new BrowserWindow({
    title: 'Window-1',
    x: 300,
    y: 300,
    width,
    height,
  })

  const win2 = new BrowserWindow({
    title: 'Window-2',
    y: 300,
    x: 300 + width,
    width,
    height,
  })

  // Create BrowserView and append it to Window-1
  const view = new BrowserView()
  win1.addBrowserView(view)
  view.setBounds({
    x: 0, y: 0, width, height,
  })
  // Change BrowserView's owner window to Window-2 (e.g. to move tab between windows)
  win2.addBrowserView(view)

  view.webContents.loadURL('https://electronjs.org')
  await once(view.webContents, 'did-finish-load')

  view.webContents.executeJavaScript('alert("Close this window")')
}

main()
.catch(error => {
  console.error(error)
  app.exit(1)
})
```

### Additional Information

`TopLevelWindow::AddBrowserView` method should check if WebContents has an owner parent and detach the view. IMO there should be private method like `detachBrowserView` which does it.

shell/browser/api/electron_api_base_window.cc
.SetMethod("moveTabToNewWindow", &BaseWindow::MoveTabToNewWindow)
      .SetMethod("toggleTabBar", &BaseWindow::ToggleTabBar)
      .SetMethod("addTabbedWindow", &BaseWindow::AddTabbedWindow)
      .SetMethod("setWindowButtonVisibility",
                 &BaseWindow::SetWindowButtonVisibility)
      .SetProperty("excludedFromShownWindowsMenu",
                   &BaseWindow::IsExcludedFromShownWindowsMenu,
                   &BaseWindow::SetExcludedFromShownWindowsMenu)
#endif
      .SetMethod("setAutoHideMenuBar", &BaseWindow::SetAutoHideMenuBar)
      .SetMethod("isMenuBarAutoHide", &BaseWindow::IsMenuBarAutoHide)
      .SetMethod("setMenuBarVisibility", &BaseWindow::SetMenuBarVisibility)
      .SetMethod("isMenuBarVisible", &BaseWindow::IsMenuBarVisible)
      .SetMethod("setAspectRatio", &BaseWindow::SetAspectRatio)
      .SetMethod("previewFile", &BaseWindow::PreviewFile)
      .SetMethod("closeFilePreview", &BaseWindow::CloseFilePreview)
      .SetMethod("getContentView", &BaseWindow::GetContentView)
      .SetMethod("getParentWindow", &BaseWindow::GetParentWindow)
      .SetMethod("getChildWindows", &BaseWindow::GetChildWindows)
      .SetMethod("getBrowserView", &BaseWindow::GetBrowserView)
      .SetMethod("getBrowserViews", &BaseWindow::GetBrowserViews)
      .SetMethod("isModal", &BaseWindow::IsModal)
      .SetMethod("setThumbarButtons", &BaseWindow::SetThumbarButtons)
#if defined(TOOLKIT_VIEWS)
      .SetMethod("setIcon", &BaseWindow::SetIcon)
#endif
#if defined(OS_WIN)
      .SetMethod("hookWindowMessage", &BaseWindow::HookWindowMessage)
      .SetMethod("isWindowMessageHooked", &BaseWindow::IsWindowMessageHooked)
      .SetMethod("unhookWindowMessage", &BaseWindow::UnhookWindowMessage)