I had the same problem (playwright browser would launch fine in VS Code virtual env, but not in the compiled executable). I that noticed the browser error would mention the path to my Temp folder, used by playwright for the duration of the browser session. I deleted all files there. On the next compilation, the executable worked as expected. So my conclusion is that something wrong was cached (either by Playwright or Pyinstaller) and cleaning the Temp folder solved the problem for me. Putting this here, just in case it helps someone in the future.