I'm not sure why you're getting downvoted when it's the stated position of the systemd developers that they default to breaking those things. They've acknowledged it publicly. Hell, there was even a thread on the exact issue with tmux 4 years ago: https://news.ycombinator.com/item?id=11797075
Top comment on that link:
"""Salient comment: "Or somebody could go find the actual problem @keszybz saw
here - systemd/systemd#3005 - which is: In particular, for my gnome session,
if I log out, without KillUserProcesses=yes I get some processes which are
obviously mistakes. Even if I log in again, I'm much better starting those
again cleanly. fix that, and stop trying to make systemd break the world
because somebody's gnome session doesn't currently exit cleanly."""
Or Nicholas Marriott's 9 year old as-yet unanswered questions to the systemd developers, that I copy from a post by hn user JdeBP:
> "Shouldn't this code be part of glibc instead of tmux?"
> -- Nicholas Marriott, 2011
> If you want to change how processes daemonize, why don't you change how
> daemon() is implemented [...] ?
> -- Nicholas Marriott, 2016
> * https://news.ycombinator.com/item?id=11798173
> * https://news.ycombinator.com/item?id=11798328