Assuming you can, here are a couple things you can do to troubleshoot the issue you are experiencing:
If you’re running your site from shared hosting, you’re probably fine here. If you’re using VPS or Cloud hosting, make sure the user account that has access to the web server (Nginx or Apache HTTP) also has access to your theme files.
I know you said after disabling all plugins this issue persisted, but it’s a common cause of this error message, so it’s worth repeating to disable those while troubleshooting your backend access of the theme editor.
If so, try disabling WAF, flush cache and try saving changes through the theme editor again. This can happened with Cloudflare, depending on your host and WAF settings, where Cloudflare WAF challenges (does not allow) “Update files” requests at the site level (like your WordPress backend dashboard).
You can access your Cloudflare firewall logs from your CF account dashboard. If you find this is the cause (you’ll see “challenge” under the “action taken” column), you can whitelist your IP in the Cloudflare WAF event details to resolve.