Use the disown shell builtin to exit the shell but continue running already back grounded jobs. The syntax changes from shell to shell.
disown [ job ... ]
disown [-ar] [-h] [jobspec ...]
foo & disown %1 exit
ps xao pid,ppid,comm | grep foo
ps aux | grep NNNN
Note:- To attach a disowned job, the instructions in https://unix.stackexchange.com/questions/31824/how-do-i-attach-a-terminal-to-a-detached-process might be helpful. But I have not tried them.
tags | continue running the jobs in the background, detach