Actually, you should set a config on your Terminal, when your Terminal is up press ?+, then you will see below screen:
Then press shell tab and you will see below screen:
Now select Close if the shell exited cleanly
for When the shell exits.
By the above config each time with exit
command the Terminal will close but won't quit.