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

master

### What operating system are you using?

Other (specify below)

### Operating System Version

All

### What arch are you using?

Other (specify below)

### Last Known Working Electron version

_No response_

### Expected Behavior

PDF Viewer should load arbitrary PDF files.

### Actual Behavior

PDF viewer is no longer working on latest betas of v13 and master.

Broken as of https://github.com/electron/electron/pull/28462 - [Log](https://chromium.googlesource.com/chromium/src/+log/91.0.4448.0..91.0.4472.33?n=10000&pretty=fuller)

Error is 
```
[7225:0517/163141.223358:INFO:CONSOLE(6)] "Not allowed to load local resource: chrome://resources/css/text_defaults_md.css", source: chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/index.html (6)
[7225:0517/163141.254576:INFO:CONSOLE(0)] "Not allowed to load local resource: chrome://resources/js/load_time_data.m.js", source: chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/index.html (0)
[7225:0517/163141.254661:INFO:CONSOLE(0)] "Not allowed to load local resource: chrome://resources/js/cr.m.js", source: chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/index.html (0)
[7225:0517/163141.254724:INFO:CONSOLE(0)] "Not allowed to load local resource: chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js", source: chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/index.html (0)
[7225:0517/163141.254875:INFO:CONSOLE(0)] "Not allowed to load local resource: chrome://resources/js/assert.m.js", source: chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/index.html (0)
```

which originates [here](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/platform/weborigin/security_origin.cc;l=411-414;drc=e713e4b5b963cbaaf643c070273860317b58051b) so it's likely an AllowList related issue.

### Testcase Gist URL

https://gist.github.com/80a9108e271ca83c82cc4a8772e371fc

### Additional Information

_No response_
shell/browser/api/electron_api_session.cc
namespace electron {
namespace api {
namespace {
const char kPersistPrefix[] = "persist:";
void DownloadIdCallback(content::DownloadManager* download_manager,
                        const base::FilePath& path,
                        const std::vector<GURL>& url_chain,
                        const std::string& mime_type,
                        int64_t offset,
                        int64_t length,
                        const std::string& last_modified,
                        const std::string& etag,
                        const base::Time& start_time,
                        uint32_t id) {
  download_manager->CreateDownloadItem(
      base::GenerateGUID(), id, path, path, url_chain, GURL(), GURL(), GURL(),
      GURL(), base::nullopt, mime_type, mime_type, start_time, base::Time(),
      etag, last_modified, offset, length, std::string(),
      download::DownloadItem::INTERRUPTED,
      download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS,
      download::DOWNLOAD_INTERRUPT_REASON_NETWORK_TIMEOUT, false, base::Time(),
      false, std::vector<download::DownloadItem::ReceivedSlice>());
}
#if BUILDFLAG(ENABLE_BUILTIN_SPELLCHECKER)
class DictionaryObserver final : public SpellcheckCustomDictionary::Observer {
 private:
  std::unique_ptr<gin_helper::Promise<std::set<std::string>>> promise_;
  base::WeakPtr<SpellcheckService> spellcheck_;
 public:
  DictionaryObserver(gin_helper::Promise<std::set<std::string>> promise,