I have been struggling with this for several years now.
As soon as I restart Libreelec on my RPI4, the TV always automatically jumps to the HDMI channel.
I have already set the following option in config.txt:
hdmi_ignore_cec_init=1
Unfortunately, this did not solve the problem either.
Adjusting the CEC options in the Kodi menu did not solve the problem either.
However, I don't want to disable CEC completely as I want to control Kodi with the TV remote control.