I noticed if I'm watching any of the LG's built in channels and then turn off the TV, the TV will always start up again on HDMI,
whether the external device is on or not.
If I have the TV set to "Live TV" (the tuner), and turn the TV off/on, it will start up at the Live TV.
I don't think you can change this behavior.
Regarding your AppleTV box, can't you turn it off (or put it to standby) by its remote control?
There a probably a setting in the TV that controls whether the TV should turn off when an HDMI device turns off,
but I've never seen this in mine (2017 uj series)