@dbeato More on the Exchange 2013/2016 and 2019 troubleshooting. Exchange 2013 is what I have narrowed down to the issue with OWA and ECP with error 500 and the fix as above works. However the Exchange 2016 CU21 and Exchange 2019 CU10 have an issue with Security Clients with AMSI as below https://borncity.com/win/2021/07/13/exchange-2016-2019-outlook-probleme-durch-amsi-integration/
https://www.frankysweb.de/exchange-2016-2019-amsi-integration-sorgt-fuer-probleme-mit-outlook/
Disabling AMSI on the server with the WEb.config file hasn't fixed it yet, in our case we had to disable AMSI on the server and clients for now.