raspberry pi – systemd unit cannot write to tty1

I am trying to write to /dev/tty1 from a program running using systemd. It initially writes when loaded but even after putting it at the end I am unable to make it work. The process is running but not writing to /dev/tty1. There are no errors.

It works if I restart it after logging in with ssh.
It doesn’t work restarting from rc.local or putting it in crontab with @reboot. Setting StandardInput also has no effect.

[Unit]
Description=ConsoleWarning
After=mosquitto.service getty@tty1.service systemd-user-sessions.service multi-user.target
Requires=mosquitto.service getty@tty1.service systemd-user-sessions.service multi-user.target

[Service]
User=root
StandardOutput=tty
TTYPath=/dev/tty1
ExecStart=/usr/bin/mosquitto_sub -h 127.0.0.1 -t warning
Restart=always


[Install]
WantedBy=multi-user.target