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

### Problem Description

Developer cannot change caption bar theme. It remains white even if windows theme is set to dark.

### Proposed Solution

When themesource in electron is set to dark, use dwm window attributes or check an example here: [Notepad++ Source code](https://github.com/notepad-plus-plus/notepad-plus-plus/tree/master/PowerEditor/src/DarkMode)

### Alternatives Considered

Check out in Notepad++, Sublime Text, Windows Explorer, MSYS Console...

### Additional Information

_No response_
shell/browser/win/dark_mode.cc
LONG ldark = dark;
  if (g_buildNumber >= 20161) {
    
    DwmSetWindowAttribute(hWnd, 20, &ldark, sizeof dark);
    return;
  }
  if (g_buildNumber >= 18363) {
    auto data = WINDOWCOMPOSITIONATTRIBDATA{WCA_USEDARKMODECOLORS, &ldark,
                                            sizeof ldark};
    _SetWindowCompositionAttribute(hWnd, &data);
    return;
  }
  DwmSetWindowAttribute(hWnd, 0x13, &ldark, sizeof ldark);
}
void InitDarkMode() {
  
  
  auto* os_info = base::win::OSInfo::GetInstance();
  g_buildNumber = os_info->version_number().build;
  auto const version = os_info->version();
  if ((version < base::win::Version::WIN10_RS5) ||
      (version > base::win::Version::WIN10_20H1)) {
    return;
  }
  
  _SetWindowCompositionAttribute =
      reinterpret_cast<decltype(_SetWindowCompositionAttribute)>(
          base::win::GetUser32FunctionPointer("SetWindowCompositionAttribute"));