Not sure what happens in the first option in the background (gotta watch the taskmanager when you open it, not afterwards), but on the second there is a cmd opening, meaning the script is running. Since it apparently doesn’t halt the console it closes after it finishes running and the python executable is terminated.
This is intended behaviour (the cmd “should” stay open when there is an error though, provided the error halts the script/output).
I thought you wanted to open an editor though. Those two appear to be the executable to run the script, not an editor.