Oh my goodeness I had this same issue last night (now July 2025 - Windows 10 - Visual Studio 2019)
Yes - restarting my PC fixed it.
I was so confused as my debug build had the issue but my release build did not.
Remember "... have you turned it off and back on again..." lol.