Sony XR65A95L unavailable after turning off

I always get these errors after turning off the TV:

[SONY XR-65A95L(192.168.100.144):8009] Failed to connect to service ServiceInfo(type='host', data=('192.168.100.144', 8009)), retrying in 5.0s
Disconnected from SONY XR-65A95L at 192.168.100.144
[SONY XR-65A95L(192.168.100.144):8009] Heartbeat timeout, resetting connection

Already set the option to “wake TV by apps”, and set the USB mode to MTP as one of the threads suggested. Disabled all power saving, that could logically affect this behaviour.
I can’t turn the TV on via hassio, however for some time I can do it with Google Assistant

After a longer wait (couple of hours) even Google a
assistant can’t turn it on.

Previously had a KD65A1 and had no such issues.

Resolved by going to Settings → Network & Internet → Home Network → IP Control → Simple IP Control. Set this option to enabled.

I had this same issue, but rebooting the entire HA system worked for me.