It was indeed one of the background tasks. I used the "resource monitor" and found out it was something Windows Defender related, so I delayed those tasks. I found the tasks which were eating up the CPU when the display turns off. How exactly did you delay those tasks? I can't see how to do that. If I right-click on the process in the Resource Monitor I get the following options only:
Be alert for scammers posting fake support phone numbers and/or email addresses on the community. If you think you have received a fake HP Support message, please report it to us by clicking on "Flag Post".