<!--  As an open source project with a dedicated but small maintainer team, it can sometimes take a long time for issues to be addressed so please be patient and we will get back to you as soon as we can.
-->

### Preflight Checklist
<!-- Please ensure you've completed the following steps by replacing [ ] with [x]-->

* [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 for an issue that matches the one I want to file, without success.

### Issue Details

* **Electron Version:**
  * <!-- (output of `node_modules/.bin/electron --version`) e.g. 4.0.3 --> 9.0.5
* **Operating System:**
  * <!-- (Platform and Version) e.g. macOS 10.13.6 / Windows 10 (1803) / Ubuntu 18.04 x64 --> macOS 10.15.5
* **Last Known Working Electron version:**
  * <!-- (if applicable) e.g. 3.1.0 --> not sure

### Expected Behavior
<!-- A clear and concise description of what you expected to happen. -->
With the example program at [https://github.com/CyrusRoshan/electron-multiple-dock-icon](https://github.com/CyrusRoshan/electron-multiple-dock-icon), I would expect the dock icon to be hidden after the initial click, or multiple quick clicks in succession.

### Actual Behavior
<!-- A clear and concise description of what actually happened. -->
If clicking once, dock icon behaves as expected, and disappears. If quickly clicking multiple times, dock icons are quickly added. These dock icons persist after app shutdown.

### To Reproduce
<!--
Your best chance of getting this bug looked at quickly is to provide an example.
-->
Clone and run this [electron-quick-start fork](https://github.com/CyrusRoshan/electron-multiple-dock-icon), then quickly click the dock icon.

<!--
For bugs that can be encapsulated in a small experiment, you can use Electron Fiddle (https://github.com/electron/fiddle) to publish your example to a GitHub Gist and link it your bug report.
-->

<!--
If Fiddle is insufficient to produce an example, please provide an example REPOSITORY that can be cloned and run. You can fork electron-quick-start (https://github.com/electron/electron-quick-start) and include a link to the branch with your changes.
-->

<!--
If you provide a URL, please list the commands required to clone/setup/run your repo e.g.
```sh
$ git clone $YOUR_URL -b $BRANCH
$ npm install
$ npm start || electron .
```
-->

### Screenshots
<!-- If applicable, add screenshots to help explain your problem. -->
![image](https://user-images.githubusercontent.com/8443502/86441896-c3ecaf80-bcc1-11ea-8fda-619506d19331.png), can also upload a video if that'd help.



### Additional Information
<!-- Add any other context about the problem here. -->
This may have something to do with the following lines:

```
win.show();
win.setVisibleOnAllWorkspaces(true);
win.setAlwaysOnTop(true, 'pop-up-menu');
win.hide();
```

which are used for keeping BrowserWindows always on top [over fullscreen apps](https://github.com/electron/electron/issues/10078#issuecomment-331581160).
shell/browser/browser.h
PCWSTR GetAppUserModelID();
#endif  
#if defined(OS_LINUX)
  
  bool IsUnityRunning();
#endif  
  
  bool OpenFile(const std::string& file_path);
  
  void OpenURL(const std::string& url);
#if defined(OS_MAC)
  
  void NewWindowForTab();
  
  void DidBecomeActive();
#endif  
  
  
  void Activate(bool has_visible_windows);
  bool IsEmojiPanelSupported();
  
  void WillFinishLaunching();
  void DidFinishLaunching(base::DictionaryValue launch_info);
  void OnAccessibilitySupportChanged();
  void PreMainMessageLoopRun();
  void PreCreateThreads();
  
  
  void SetMainMessageLoopQuitClosure(base::OnceClosure quit_closure);
  void AddObserver(BrowserObserver* obs) { observers_.AddObserver(obs); }