Only a short hint:
I had a lot of 40x errors in different scenarios. Mainly after Moving a website from one Cyberpanel server to another.
I figured out, that my problem was caused of “mod_security” I activated on the new server.
After turned it off, all my 40x are gone.
SO my general hint: If you fight against 40x (or 50x) errors: Try first to turn off mod_security!
If it works now, you have a good start o go deeper and search the rule it causes.