### 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.0-beta.6

### What operating system are you using?

Ubuntu

### Operating System Version

18.04

### What arch are you using?

x64

### Last Known Working Electron version

15.2.0

### Expected Behavior

`localStorage` data is preserved even when accessing `localStorage` in a preload script of a `webview`.

### Actual Behavior

Accessing `localStorage` in the preload script clears out the `localStorage` for the page. 

Subsequent loads without the `localStorage`-accessing code in preload will show the localStorage data has been saved, but as soon as you access `localStorage` in the preload script it will be cleared as far as the page is concerned.

This exists in all 16.x versions.

### Testcase Gist URL

https://gist.github.com/Kilian/a82a276fc842b01c836f8dea14adb6f1

### Additional Information

This fiddle runs 16.0.0-beta.6 though all 16.x versions exhibit this behaviour.

Reproduction steps:

1. Launch the app. The devtools for the webview is opened.
1. In the devtools navigate to the "application" tab, and in the side bar click open "localStorage" under "storage" and select "https://polypane.app".
1. See that it says "polypane-seen-release" with a value. Change that to any other value, and add a random new localStorage entry as well.
1. Close the app and restart it. Navigate back to the applications tab. See that the localStorage value you added is gone, and the "polypane-seen-release" value has been reset (the site sets this on load when empty) - the localStorage has been cleared before load.
1. Close the app again, and now comment out the single line in the preload.js script. 
1. Start the app again. See that your changes from step 3 are now visible.
2. Close the app, uncomment the single line in the preload.js script and restart the app to show localStorage is reset again.

You can repeately do the last three steps and see the results are the same each time. Accessing localStorage in the preload script somehow prevents the actual localStorage data from being available to the page.

You can follow the same steps for 15.x versions and see that step 4 shows the correct localStorage data still.

shell/browser/web_contents_preferences.cc
Instances().erase(std::remove(Instances().begin(), Instances().end(), this),
                    Instances().end());
}
void WebContentsPreferences::Clear() {
  plugins_ = false;
  experimental_features_ = false;
  node_integration_ = false;
  node_integration_in_sub_frames_ = false;
  node_integration_in_worker_ = false;
  disable_html_fullscreen_window_resize_ = false;
  webview_tag_ = false;
  sandbox_ = absl::nullopt;
  native_window_open_ = true;
  context_isolation_ = true;
  javascript_ = true;
  images_ = true;
  text_areas_are_resizable_ = true;
  webgl_ = true;
  enable_websql_ = true;
  enable_preferred_size_mode_ = false;
  web_security_ = true;
  allow_running_insecure_content_ = false;
  offscreen_ = false;
  navigate_on_drag_drop_ = false;