My custom software only works while I’m logged in with ssh? Why?

I have 2 headless systems which send syncronized udp packets to a base system.

All are raspberry pis running raspbian. The 2 headless systems are supposed to be identical.

For some reason one of the headless systems is not sending packets like it should be. I can ping it, but the ping times are irregular 1-500ms.

Here’s where it gets weird. If I ssh into the misbehaving system to see whats wrong. It instantly starts working. The ping goes down to normal and my program starts sending packets. If I log out again, after about 10 seconds I stops working.

The program on the headless systems is started by a service:

[Unit]
Description= REDACTED

[Service]
Type=simple
RemainAfterExit=True
ExecStart=/home/pi/redacted/executable_name.out
WorkingDirectory=/home/pi/redacted
RestartSec=10
Restart=always
#Restart=on-failure

[Install]
WantedBy=default.target

Why might this be happening?