At the moment if you enroll the Elastic Agent with --headers then those headers are then placed into the agent information file. Those headers are sent both to Fleet Server and Elasticsearch. There is a case (agentless) where those need to be different.
The configuration includes a different header value in the configuration but the Elastic Agent overwrites it with the value from the agent information. I believe this should only place the header value there if there is not already a header present. If the header is present it should take priority over the header in agent information.