Hi @Will
SharePoint has external sharing settings at both the organization level and the site level (previously called the "site collection" level). To allow external sharing on any site, you must allow it at the organization level. You can then restrict external sharing for other sites. If a site's external sharing option and the organization-level sharing option don't match, the most restrictive value will always be applied.
All in all, you need to allow anonymous access in the entire tenant first, and then enable this feature in the corresponding site.
By default when you create a Communication site, external sharing has been disabled. As Communication sites are not listed in the site collection admin UI you need to turn to code or PowerShell to fix this.
More information:
https://www.techmikael.com/2017/08/enable-external-sharing-on.html
Please note: Microsoft provides third-party contact information to help you find technical support. This contact information may change without notice. Microsoft does not guarantee the accuracy of this third-party contact information.
In my test, it works fine.
Update:
Anonymous access is supported in the SharePoint on-premise.
For security reasons, anonymous access is not supported in SharePoint online. The workaround is to use share and invite external users to visit the site.
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.