You ROCK!!! This has been killing me for months!!!
Here's a step by step:
Go to settings -> Battery -> Detail
Select the apps you don't want to be included in Auto-optimise program such as "Swiftkey" , "Solo Launcher" etc...
Choose: Disable.
Voila! It's done!
