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

15.0.2

### What operating system are you using?

macOS

### Operating System Version

macOS

### What arch are you using?

x64

### Last Known Working Electron version

13

### Expected Behavior

I updated my electron version to v15.0.2 but noticed that Metadata is not working anymore....

```js
    window.navigator.mediaSession.metadata = new window.MediaMetadata(metadata);
```
NOTE: it was working on v13.0.1

### Actual Behavior

.

### Testcase Gist URL

_No response_

### Additional Information

.
shell/browser/api/electron_api_global_shortcut.cc
if (accelerator_callback_map_.find(accelerator) ==
      accelerator_callback_map_.end()) {
    
    
    NOTREACHED();
    return;
  }
  accelerator_callback_map_[accelerator].Run();
}
bool GlobalShortcut::RegisterAll(
    const std::vector<ui::Accelerator>& accelerators,
    const base::RepeatingClosure& callback) {
  if (!electron::Browser::Get()->is_ready()) {
    gin_helper::ErrorThrower(JavascriptEnvironment::GetIsolate())
        .ThrowError("globalShortcut cannot be used before the app is ready");
    return false;
  }
  std::vector<ui::Accelerator> registered;
  for (auto& accelerator : accelerators) {
    if (!Register(accelerator, callback)) {
      
      UnregisterSome(registered);
      return false;
    }
    registered.push_back(accelerator);
  }
  return true;
}
bool GlobalShortcut::Register(const ui::Accelerator& accelerator,