HDMI breakout and a esp32 module flashed with esphome is another option. The tv most likely doesn’t care that the port that sent on/off command is not the same port the video signal is coming from..

The tv does care which port it came from, since it automatically switches to the one which made the request.

One could build a IR emitter but you need soldering skills for that or buy a usb one which cost north of 30€ + shipping.