Detaching Process from "Run Script Over SSH" in Shortcuts

Try using tmux it'll keep sessions alive after you leave.