Agent fleet URL not taking what is in the yaml config

Has anyone seen an issue with the fleet url that the agent is using does not correspond to the url in the yaml file ( elastic-agent-managed-kubernetes.yml) or the corresponding fleet configuration.
evn vars for elsatic-agent in kube-system

Environment:
      FLEET_ENROLL:            1
      FLEET_INSECURE:          true
      FLEET_URL:               https://fleet-server-agent-http.elasticsystem.svc:8220
      ELASTICSEARCH_HOST:      https://elasticsearch-es-http.elasticsystem.svc:9200
      FLEET_ENROLLMENT_TOKEN:  xxxxxxxxxxxx
      KIBANA_HOST:             http://kibana:5601
      KIBANA_FLEET_USERNAME:   elastic
      KIBANA_FLEET_PASSWORD:   xxxxxxxxxx
      NODE_NAME:                (v1:spec.nodeName)
      POD_NAME:                elastic-agent-qk6m2 (v1:metadata.name)
      ELASTIC_NETINFO:         false

In the logs for elastic-agent pod im seeing this.
message":"Error dialing lookup elasticsearch-es-http.elastic-system.svc on 10.96.0.10:53: no such host","component

Why is it using the wrong URL (elastic-system) and not (elasticsystem)
fyi The reason I'm using a non dash namespace is when you deploy the standard template and get an error saying you can't have a dash in the name space for the X pack configuration.
Also I'm using the correct URL and the fleet configuration.