Found a way to remove this ghost script, was far easier than all I’ve tried!
In the UI, click on “Info” on the script row, then click “Remove entity”: