If you have activated Developer Options then look in there to see if Stay Awake is ticked, if it is then untick it, if that is ticked then the screen will stay on when charging.
Hmm, have you tried turning off Daydream in the display settings if you use it? Only other things I can think of are maybe a Xposed module if you use them or a app running in background.
Don't use daydream!
I've figured that it only does it from 90% to 100%?! Weird...
I have exactly the same issue, changed different cable, charger, usb ports from pc, 95% of the time it will have the same problem.
Well if there is no fix, then i'll have to take it back, as it keeps the phone very hot by keeping the screen on and off.
Don't use daydream!
I've figured that it only does it from 90% to 100%?! Weird...