Opus doesn't remove explicit quotes, so that shouldn't be what was happening.
Needing to escape the quotes may be an issue with powershell, but isn't something that Opus is doing.
Edit: Re-read and realise the issue was the quotes needed escaping, not that they needed adding or were being removed. That's a powershell thing, no an Opus thing, I think.
Most of what I said in the older reply isn't important, although I'll append it here in case it's useful general info for someone else:
You need to explicit quotes around environment variables that contain spaces (if they're being used in paths), since quotes are needed around paths containing spaces, and nothing adds quotes automatically around env-var expansions.
That is true whether you run the thing via Opus or via a Command Prompt or anything else.
You do not need the quotes around Opus codes like {filepath} (unless you've also suppressed automatic quoting using @nofilenamequoting) since Opus will add those for you if there's a space in the path. (But if you need the quotes to be escaped, you would indeed need to do that explicitly.)
I'm sorry. I made a mistake.
This issue has not been resolved yet. If I try to run the script by selecting a file that contains quotation marks in the path, I will get an error.
Click the button to the left of OK ("Advanced" in English; the one with the "(V)" hotkey in your screenshot) to put the button editor into multi-line mode.