For instance, I've been using for several years this app, Stay Alive: https://play.google.com/store/apps/d...ics.stay.alive
It gives you the option of having the screen not turning itself off when charging. It's crucial in the car, where I have a dock mounted and use the phone for navigation, music playback, etc.
On my previous Nexus 6P the app worked flawlessly. With 6T sometimes the screen turns off and then it turn itself on once more, as if the process got killed and then restarted.
I have the "don't optimize" option activated for Stay Alive.
There are other strange behaviours I'm seeing, with Tasker for instance. And the nagging feeling that they might depend on background process handling at the OS level.
I recently did turn off Battery/Battery Optimisation/Advanced Optimisation/Deep Optimisation and Sleep standby optimisation, hoping to get better results. I still haven't reached a conclusion about it.
I have to say that it's pretty annoying to have the phone decide for you what should be happening for apps. For instance, I had Firefox in the "Don't optimize" category but it still had problems with opening new pages after a while. Turning off the above two options seems to have cured the problem but if that is needed I wonder what the heck "Don't optimise" mean for OnePlus.
I hope to get to the bottom of this as, quite frankly, not having the phone "act on his own" behind the scenes is exactly why I chose Android as my OS.