Please find reference here to the question previously asked
When deploying multiple retool instances, the RETOOL_EXPOSED_ environment variables aren't just used for secrets for resources, but they can also be used as env/instance level configs which can be used to provide difference context to each retool instance.
With that in mind, the %RETOOL_EXPOSED_VARIABLES% should be available to the whole app where {{ javascript }} can be executed.