Have you checked the ECO mode settings on your LG TV? This lets you choose from a list of options as to whetehr the TV turns off at say 2,4,6 or 8 hour intervals, or stays On by selecting Auto power Off.
I'm not sure where it will be on your TV but try under Settings > General > Time > Timers.
Or try OLED care > Device Self Care > Energy saving options > Auto power off and switch it to Off
On my LG TV it's under Settings > All Settings > General > Additional Settings > Eco Mode and I switch it to off
This was set to 2 hours. Normally before it turns off I will be notified the tv will be turning off and to stop it I must click ok on the pop up. This does not appear when the tv randomly switches off. I however have turned it off to see if this fixes it. Fingers crossed.