Azure AD SSO setting behind a proxy not working

This would not work as these are the steps for Elastic Agent, not Elasticsearch.

Since you are trying to configure SSO with Azure AD, which is a paid feature, I suggest that you open a ticket with Support, I'm not sure that configuring this behind a proxy is supported.