### 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

16.0.2

### What operating system are you using?

macOS

### Operating System Version

macOS Monterrey 12.0.1

### What arch are you using?

arm64 (including Apple Silicon)

### Last Known Working Electron version

13

_No response_

### Expected Behavior

This configuration should produce a vibrant window:

```ts
new BrowserWindow({
    width: 800,
    height: 600,
    backgroundColor: undefined,
    vibrancy: "sidebar",
    titleBarStyle: "hidden",
    webPreferences: {
      preload: path.join(__dirname, 'preload.js')
    }
  })
```

### Actual Behavior

The window has a white background.

As of Electron 16.x vibrancy works if `backgroundColor` is not set at all, but not if it's explicitly set to `undefined`. As a consequence, if the background color is set to any value, it's impossible to unset it later.

### Testcase Gist URL

_No response_

### Additional Information

What's interesting is that this option check returns `true` if the background color is explicitly set to `undefined`:

https://github.com/electron/electron/blob/bd10b19b0cdc46cdbadb570af89305e64541b679/shell/browser/api/electron_api_browser_window.cc#L50

But this one returns `false`:

https://github.com/electron/electron/blob/bd10b19b0cdc46cdbadb570af89305e64541b679/shell/browser/native_window.cc#L208

shell/browser/api/electron_api_browser_window.cc
*width = web_contents()->GetPreferredSize().width();
}
void BrowserWindow::OnCloseButtonClicked(bool* prevent_default) {
  
  
  
  *prevent_default = true;
  
  
  
  
  if (window_unresponsive_closure_.IsCancelled())
    ScheduleUnresponsiveEvent(5000);
  
  if (!web_contents() || !api_web_contents_)
    return;
  
  api_web_contents_->NotifyUserActivation();
  
  for (NativeBrowserView* view : window_->browser_views()) {
    auto* vwc = view->web_contents();
    auto* api_web_contents = api::WebContents::From(vwc);
    
    if (api_web_contents)