Universal Control requires you to manually close it before restarting or closing down a Mac computer. This is an annoyance to some customers, however there is a very valid reason for this behavior:
Imagine being at a live show. The band is onstage, in the middle of a song and someone accidentally pushes the Mac's power button while resting their hand on the computer! Now, instead of an automatic shutdown or reboot, Universal Control stops the process and requires you to choose, saving the show.
So, in your workflow, make sure you shut down Universal Control before you perform a shutdown/restart to avoid this message.