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

^12.0.6

### What operating system are you using?

Windows

### Operating System Version

Windows 10 Version 20H2

### What arch are you using?

x64

### Last Known Working Electron version

_No response_

### Expected Behavior

Upon setting setContentProtection(true), I expect that this setting should be preserved following a .hide() and .show()/.showInactive() of the `BrowserWindow`.

### Actual Behavior

If setting setContentProtection(true) on the BrowserWindow, which behind the scene uses the `SetWindowDisplayAffinity` WinAPI call  (https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setwindowdisplayaffinity), it sets the window affinity as `WDA_EXCLUDEFROMCAPTURE` for Windows 10 builds newer or equal to Windows 10 Version 2004, which means that the window is completely invisible in screenshots or any other screen captures. Please see screenshot below with window not showing, so content 'behind' it being fully visible.
![image](https://user-images.githubusercontent.com/39557534/117661722-665da500-b1a7-11eb-9ae4-108e3aed4ab1.png)

This works fine up until a browserWindow.hide() is called. After that, regardless of doing browserWindow.show() or browserWindow.showInactive() afterwads, screencapture/screenshots then show the window without content, but just a black background, as if the window affinity changed to `WDA_MONITOR`. Please see screenshot below with window showing with black content after hide and show commands:
![image](https://user-images.githubusercontent.com/39557534/117661783-7aa1a200-b1a7-11eb-9a74-3f916cc6100a.png)




### Testcase Gist URL

_No response_

### Additional Information

Steps to repro:

I created a small project :
https://github.com/horymury/content-protection
which sets `setContentProtection` as true, then after 5 seconds it hides the BrowserWindow, and after 8 seconds it shows the BrowserWindow again. 

If running Windows 10 Version 2004 or newer, if you do a screenshot in the first 5 seconds, you will see that the BrowserWindow correctly does not show up in the image. After 8 seconds ( after the browser window was hidden and then shown again) if you do a screenshot again, you will see that the BrowserWindow appears but with black content, as in the screenshots I uploaded.
shell/browser/native_window_views.cc
#if defined(USE_X11)
  
  if (global_menu_bar_ && menu_model == nullptr) {
    global_menu_bar_.reset();
    root_view_->UnregisterAcceleratorsWithFocusManager();
    return;
  }
  
  if (ShouldUseGlobalMenuBar()) {
    if (!global_menu_bar_)
      global_menu_bar_ = std::make_unique<GlobalMenuBarX11>(this);
    if (global_menu_bar_->IsServerStarted()) {
      root_view_->RegisterAcceleratorsWithFocusManager(menu_model);
      global_menu_bar_->SetMenu(menu_model);
      return;
    }
  }
#endif
  
  gfx::Size content_size = GetContentSize();
  bool should_reset_size = use_content_size_ && has_frame() &&
                           !IsMenuBarAutoHide() &&
                           ((!!menu_model) != root_view_->HasMenu());
  root_view_->SetMenu(menu_model);
  if (should_reset_size) {