I customised my Google Sites (Google Workplace) url from "sites.google.com/domain.com/sitename" to "www.domain.com". As a subdomain prefix I used www. In order to make the site work, I need to insert a CNAME record with hostname "www" and content "ghs.googlehosted.com".
Unfortunately my webhosting doens't allow "www" as a CNAME name.
Is there a way around it?
I'm not sure I understand what webhosting has to do with it, I think you meant your domain registrar.
You can do the following if your domain registrar does not allow you to create a CNAME record pointing to the www subdomain:
As a bonus, if your domain isn't the primary one, you will be able to implement a small hack that allows you to redirect from your naked domain to its www version (if the domain is the primary one, then you can do this in the console).