At one point cPanel user has password-protected the public_html folder using the cPanel Directory Privacy option. Then He removed it at one time, however, cPanel didn’t rebuild the cache files for some reason inside userdata folder: /var/cpanel/userdata/$USERNAME

so when the webserver was switched from LiteSpeed to Apache, files were password protected again:

I removed the password protection from cPanel > Directory Privacy for the public_html folder

but the directory is still protected:

Restarted Apache webserver with the command:
service httpd restart
After checking files in the userdata folder I noticed that they weren’t updated even after restarting apache:
ll /var/cpanel/userdata/$USERNAME
So I used the following sripts to regenerate userdata cache and rebuild apache conf files:
/scripts/updateuserdatacache
/scripts/rebuildhttpdconf
service httpd restart
The website was then made available again.