you are describing a thermal related event, i recomend you install HP Advisor for your model
https://support.hp.com/us-en/document/c01969885
many cpu temp programs are not acurate in reading the actual tCase tempture and simply guess
one of the better programs is coretemp (current build 1.12.1)