If (on macOS Mojave version 10.14.3) I:
- create an executable shell script,
- open the Finder application,
- in Finder go to the directory containing the script I just created,
- then right click on the name of that script, and
- select "Make Alias"
it creates a new file in the same directory with the name
script alias (where
script is the name of the file I right-clicked on in
Finder) with the name of that file selected. I can then enter a new name for that alias or change the focus it I want to keep that name for the alias.
Note that I did not need to run the script to create the alias.
If I then double-click on the name of the alias in
Finder, it opens a new window, runs the script in that window, and when the script exits, the window disappears.
If I move the file created onto my desktop and double-click on it there, macOS opens a new window, runs the script in that window, and when the script exits, the window disappears.
In either of the above cases, the window is running an interactive shell and can accept keyboard input in response to prompts issued by the script. If the script isn't expecting user input, I can minimize the window or move it behind other open windows and it will continue running until the script exits (and then the window disappears). Is that what you want to have happen?