Repository: yt-dlp
Issue: `--cookies-from-browser` errors when Chrome/chromium-based browser is open in Windows
Labels: bug,external issue,core:cookies

### DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

- [X] I understand that I will be **blocked** if I *intentionally* remove or skip any mandatory\* field

### Checklist

- [X] I'm reporting a bug unrelated to a specific site
- [X] I've verified that I'm running yt-dlp version **2023.03.04** ([update instructions](https://github.com/yt-dlp/yt-dlp#update)) or later (specify commit)
- [X] I've checked that all provided URLs are playable in a browser with the same IP and same login details
- [X] I've checked that all URLs and arguments with special characters are [properly quoted or escaped](https://github.com/yt-dlp/yt-dlp/wiki/FAQ#video-url-contains-an-ampersand--and-im-getting-some-strange-output-1-2839-or-v-is-not-recognized-as-an-internal-or-external-command)
- [X] I've searched [known issues](https://github.com/yt-dlp/yt-dlp/issues/3766) and the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar issues **including closed ones**. DO NOT post duplicates
- [X] I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue)

### Provide a description that is worded well enough to be understood

cannot extract cookies from chrome when the chrome browser is open
and after closing all the windows of chrome, it can run correctly
i have no idea what is going wrong

### Provide verbose output that clearly demonstrates the problem

- [X] Run **your** yt-dlp command with **-vU** flag added (`yt-dlp -vU <your command line>`)
- [ ] If using API, add `'verbose': True` to `YoutubeDL` params instead
- [X] Copy the WHOLE output (starting with `[debug] Command-line config`) and insert it below

### Complete Verbose Output

```shell
C:\Users\Mechrevo>yt-dlp.exe -vU --newline -R 30 --proxy socks5://127.0.0.1:7890 -i -o "Z:\YouTube\%(upload_date)s %(title)s.%(ext)s" --ignore-config --hls-prefer-native --add-metadata --embed-thumbnail --sub-langs all,-live_chat,-danmaku,-jpn-JP --embed-subs --merge-output-format mp4 --live-from-start --cookies-from-browser chrome "https://www.youtube.com/watch?v=3DiKrPSmO5c"
[debug] Command-line config: ['-vU', '--newline', '-R', '30', '--proxy', 'socks5://127.0.0.1:7890', '-i', '-o', 'Z:\\YouTube\\%(upload_date)s %(title)s.%(ext)s', '--ignore-config', '--hls-prefer-native', '--add-metadata', '--embed-thumbnail', '--sub-langs', 'all,-live_chat,-danmaku,-jpn-JP', '--embed-subs', '--merge-output-format', 'mp4', '--live-from-start', '--cookies-from-browser', 'chrome', 'https://www.youtube.com/watch?v=3DiKrPSmO5c']
[debug] Encodings: locale cp936, fs utf-8, pref cp936, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2023.03.04 [392389b7d] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.19045-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg 4.4-full_build-www.gyan.dev (setts), ffprobe 4.4-full_build-www.gyan.dev
[debug] Optional libraries: Cryptodome-3.17, brotli-1.0.9, certifi-2022.12.07, mutagen-1.46.0, sqlite3-2.6.0, websockets-10.4
[Cookies] Extracting cookies from chrome
[debug] Extracting cookies from: "C:\Users\Mechrevo\AppData\Local\Google\Chrome\User Data\Default\Network\Cookies"
[debug] Found local state file at "C:\Users\Mechrevo\AppData\Local\Google\Chrome\User Data\Local State"                                           Traceback (most recent call last):
File "yt_dlp\__main__.py", line 17, in <module>
File "yt_dlp\__init__.py", line 967, in main
File "yt_dlp\__init__.py", line 927, in _real_main
File "yt_dlp\YoutubeDL.py", line 652, in __init__
File "yt_dlp\YoutubeDL.py", line 3827, in print_debug_header
File "yt_dlp\YoutubeDL.py", line 3871, in _setup_opener
File "yt_dlp\cookies.py", line 99, in load_cookies
File "yt_dlp\cookies.py", line 120, in extract_cookies_from_browser
File "yt_dlp\cookies.py", line 289, in _extract_chrome_cookies
File "yt_dlp\cookies.py", line 952, in _open_database_copy
File "shutil.py", line 418, in copy
File "shutil.py", line 264, in copyfile
PermissionError: [Errno 13] Permission denied: 'C:\\Users\\Mechrevo\\AppData\\Local\\Google\\Chrome\\User Data\\Default\\Network\\Cookies'
[25380] Failed to execute script '__main__' due to unhandled exception!
C:\Users\Mechrevo>
```