I've had this problem for a while on my LG G3 running LineageOS (so no LG bloatware active) but I think I've managed to solve it. Turns out in my case it was to do with Marshmallow/Nougat's "Battery optimisation" feature
Go to Settings -> Battery and press the three dot menu on the top right to...