Solved: it was just that I forgot to update .vscode/settings.json after creating a src/ subfolder and moving the “executable” file in there.
Of course, this is a very silly error, but it is worth noting that there is no clue about the nature of the problem in the output message. Nothing along the lines of “file MyScript.jl not found”.