Stopping seahub results in a failed systemd unit

For quite a while and on many different version on an Ubuntu 20.04 server, we’ve been having this bizarre issue where after stopping seahub using systemctl stop seahub we enter a weird state where seahub is stopped, seafile is still running, and yet systemd is convinced that seahub has failed (presumably the exit wasn’t clean as part of the stop).

● seahub.service - Seafile hub
     Loaded: loaded (/etc/systemd/system/seahub.service; enabled; vendor preset: enabled)
     Active: failed (Result: signal) since Tue 2022-08-09 12:10:22 CEST; 3s ago
    Process: 3644345 ExecStart=/opt/seafile/seafile-server-latest/seahub.sh start (code=exited, status=0/SUCCESS)
    Process: 3765485 ExecStop=/opt/seafile/seafile-server-latest/seahub.sh stop (code=exited, status=0/SUCCESS)
   Main PID: 3644358 (code=killed, signal=KILL)

Aug 08 15:05:48 seafile seahub.sh[3644345]: Starting seahub at port 8000 ...
Aug 08 15:05:54 seafile seahub.sh[3644345]: Seahub is started
Aug 08 15:05:54 seafile seahub.sh[3644345]: Done.
Aug 08 15:05:54 seafile systemd[1]: Started Seafile hub.
Aug 09 12:10:21 seafile systemd[1]: Stopping Seafile hub...
Aug 09 12:10:21 seafile seahub.sh[3765485]: Stopping seahub ...
Aug 09 12:10:21 seafile systemd[1]: seahub.service: Main process exited, code=killed, status=9/KILL
Aug 09 12:10:22 seafile seahub.sh[3765485]: Done.
Aug 09 12:10:22 seafile systemd[1]: seahub.service: Failed with result 'signal'.
Aug 09 12:10:22 seafile systemd[1]: Stopped Seafile hub.

Now we always thought this was just something weird with this server, but recently I migrated a very old seafile installation to a new Debian 11 server. That installation had never had any trouble before, but either by upgrading from Seafile 7.0 to 9.0 or because of the newer operating system, it now has the exact same problem:

● seahub.service - Seafile hub
     Loaded: loaded (/etc/systemd/system/seahub.service; enabled; vendor preset: enabled)
     Active: failed (Result: signal) since Tue 2022-08-09 12:08:00 CEST; 2s ago
    Process: 384549 ExecStart=/opt/seafile/seafile-server-latest/seahub.sh start (code=exited, status=0/SUCCESS)
    Process: 384571 ExecStop=/opt/seafile/seafile-server-latest/seahub.sh stop (code=exited, status=0/SUCCESS)
   Main PID: 384562 (code=killed, signal=KILL)
        CPU: 960ms

aug 09 12:07:47 sys seahub.sh[384549]: Starting seahub at port 8000 ...
aug 09 12:07:52 sys seahub.sh[384549]: Seahub is started
aug 09 12:07:52 sys seahub.sh[384549]: Done.
aug 09 12:07:52 sys systemd[1]: Started Seafile hub.
aug 09 12:07:59 sys systemd[1]: Stopping Seafile hub...
aug 09 12:07:59 sys seahub.sh[384571]: Stopping seahub ...
aug 09 12:07:59 sys systemd[1]: seahub.service: Main process exited, code=killed, status=9/KILL
aug 09 12:08:00 sys seahub.sh[384571]: Done.
aug 09 12:08:00 sys systemd[1]: seahub.service: Failed with result 'signal'.
aug 09 12:08:00 sys systemd[1]: Stopped Seafile hub.

Does anyone have any idea what is causing this? While googling, I see others are also having this same problem and never found a solution. This is really quite annoying, since it will generate emails from these servers that there are failed jobs whenever someone runs seafile-gc or upgrades seafile to a new version. Debugging help is also more than welcome!