The HP laptops have a power management system in the bios. It monitors your computer use, and limits the battery to 80% if the laptop appears to be use the power cable often. As a way to prolong the battery life. However the setting can be turned off  here. 



and than choose

'Maximise my battery duration'

Or the step in full, with a bit of extra details on why this occurs, here's a recording of the steps. 


https://www.youtube.com/watch?v=u8e9oWso_BE