Adding site scripts is purely a remote function, meaning the code is executed on the SharePoint servers using your raw input (title, description, content). There appears to be some URL validation happening on the server, perhaps as simple as validating that a URL ends in ".logic.azure.com" (or ".us" in gov clouds).
In the GCC High tenants (which generally seem "a few versions behind"), the When a HTTP request is received trigger always produces URLs with the same hostname, whether the Flow is in the default environment or another, and regardless of that environment's type (including Developer types) or being part of a solution.