As an immediate WA, please hardcode the proxy value (don't use variable) and log a support case mentioning #SKYOPS-21877 to aid expedite the AEM engineer analysis - thanks.
For best practice, we advise JDK v11 (latest update level) for AEM v6.5+ as stipulated here:https://experienceleague.adobe.com/docs/experience-manager-65/deploying/introduction/technical-requirements.html?lang=en#java-virtual-machines
Please start here [0] and let us know on how you get on:[0] https://experienceleague.adobe.com/docs/experience-cloud-kcs/kbarticles/KA-17476.html?lang=en#