Odroid N2 wake on lan (wol) not working when HDMI connected with TV

I have a problem with Wake on Lan with my Odroid N2. It works, but not always.

My setup:
Odroid N2 with CoreELEC 9.2.2 -> Denon X4500H -> LG C8
Settings: CEC off in Kodi settings, WOL on in CoreElec settings.

When connected to a normal computer monitor, wake on lan works.

When connected to my AVR and TV it doesn’t work.

Can it be possible that CEC signals from my TV or AVR are breaking wake on lan?

Because CEC as not working as expected with my devices, I want Home Assistant to control and turn on my devices. For example, when I select de Kodi input on my TV, Kodi is turned on. When I turn off the TV, Kodi is shutdown.
When the TV input is switched away from Kodi and Kodi is idle, turn off Kodi.

If somebody knows a settings I misted or something else?