With Defender when I scan after a while it shows error:

With Defender when I scan after a while it shows error:
Your server resource usage is too close to your limit. Please try again in 15 minutes.
I have added to my function.php file but same error:

add_filter( 'wd_limit_cpu', 'wd_limit_cpu' );
function wd_limit_cpu() {
return 1;
}

My website is hosted on Namecheap.com shared hosting. I have contacted them but they say everything is normal from their side.