TV auto-switches to OSMC when turned on

I think I have the same issue as you:

https://discourse.osmc.tv/t/hdmi-cec-issue-lg-tv-rpi3-osmc-2017-02