In https://w3c.github.io/webdriver-bidi/#run-webdriver-bidi-preload-scripts we pass environment settings to evaluate function body, which is wrong in the sandbox case because that environment settings realm is the document's realm, not the sandbox realm.
In https://w3c.github.io/webdriver-bidi/#run-webdriver-bidi-preload-scripts we pass
environment settingstoevaluate function body, which is wrong in the sandbox case because that environment settings realm is the document's realm, not the sandbox realm.