I recently encountered this issue when deploying MediaWiki 1.35 + VisualEditor onto Namecheap Shared Hosting which uses Apache.
If you experience this error when attempting to save a page, it is likely that ModSecurity has triggered a warning. In order to resolve this issue I simply had to contact Namecheap support and request that they whitelist the security rules that were being triggered on my site, since then I have been able to use VisualEditor perfectly fine.