### 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 (base::mac::IsAtLeastOS10_14()) {
    constexpr ui::KeyboardCode mediaKeys[] = {
        ui::VKEY_MEDIA_PLAY_PAUSE, ui::VKEY_MEDIA_NEXT_TRACK,
        ui::VKEY_MEDIA_PREV_TRACK, ui::VKEY_MEDIA_STOP,
        ui::VKEY_VOLUME_UP,        ui::VKEY_VOLUME_DOWN,
        ui::VKEY_VOLUME_MUTE};
    if (std::find(std::begin(mediaKeys), std::end(mediaKeys),
                  accelerator.key_code()) != std::end(mediaKeys)) {
      bool trusted =
          electron::api::SystemPreferences::IsTrustedAccessibilityClient(false);
      if (!trusted)
        return true;
    }
  }
  return false;
}
#endif
}  
namespace electron {
namespace api {
gin::WrapperInfo GlobalShortcut::kWrapperInfo = {gin::kEmbedderNativeGin};
GlobalShortcut::GlobalShortcut(v8::Isolate* isolate) {}
GlobalShortcut::~GlobalShortcut() {
  UnregisterAll();
}
void GlobalShortcut::OnKeyPressed(const ui::Accelerator& accelerator) {