
When ValheimServerGUI is started automatically, no child processes are created for the Valheim server.
The problem is that when you run the restart script again, the Valheim server does not exit.

That is correct, so the children processes are also terminated at the restart script.