You can reproduce that by running this script:
script
ctx.write('Hello SQLDev');
Here's the screenshot:

I used the “Mac OSX with JDK 17 included” version.
So, my question is, why not include a GraalVM JDK with JavaScript support? Or even better, why not simply bundle a JavaScript engine with SQLDev?
We have the same problem with SQLDev for VS Code and the standalone version of SQLcl. It would make our lives so much easier if a JavaScript engine was included in the distributions, making the script command work everywhere.