ECE 4.0 Unable to initialize Fleet

i have a newly installed ECE 4.0 for test purpose. when i create a new deployment that contain integration server or add integration sever to an existing deployment it fails to load fleet server and i get Unable to initialize Fleet connection closed by backend.
the host in connected to internet via proxy which i suspect is causing the problem. i added the proxy settings in /etc/environment and in docker config.
any advice what is the best way to configure proxy settings to get around this issue?

when creating an new deployment with integration server i creates a docker agent container and i see that its trying to connect to elasticsearch over 127.0.0.1:9200 in container logs

timestamp":"2025-05-19T08:38:48.886Z","message":"failed to fetch elasticsearch version","component":{"binary":"fleet-server","dataset":"elastic_agent.fleet_server","id":"fleet-server-default","type":"fleet-server"},"log":{"source":"fleet-server-default"},"ecs.version":"1.6.0","service.name":"fleet-server","service.type":"fleet-server","error.message":"dial tcp 127.0.0.1:9200: connect: connection refused","ecs.version":"1.6.0"}