Elastic-Agent Upgrade missing Version number in Source URI when setting custom Repository

Elastic-Stack 8.4.2
Elastic-Agent 8.4.1 -> Elastic Agent 8.4.2 Upgrade
Windows Server 2016

We've encountered an issue with the upgrade of the elastic-agents to the newest version. Looking into the log message from fleet we see that during the upgrade process the target version number is missing from the source URI (see below)

http://nexus.test.ch/repository/proxy-raw-elasticagent/beats/elastic-agent/elastic-agent--windows-x86_64.zip -> bad

http://nexus.test.ch/repository/proxy-raw-elasticagent/beats/elastic-agent/elastic-agent-8.4.2-windows-x86_64.zip -> would be right

[elastic_agent][error] metricbeat stderr: "2022-09-21 01:05:23.5053752 +0200 CEST m=+5.457796101 write error: error file rotating files reason: time interval: failed on C:\\Program Files\\Elastic\\Agent\\data\\elastic-agent-8d7885\\logs\\default\\metricbeat-20220920-17.ndjson during rotation: CreateFile C:\\Program Files\\Elastic\\Agent\\data\\elastic-agent-8d7885\\logs\\default\\metricbeat-20220920-17.ndjson: Access is denied.\n"

[elastic_agent][error] failed to dispatch actions, error: failed upgrade of agent binary: 2 errors occurred:
	* package 'C:\Program Files\Elastic\Agent\data\elastic-agent-8d7885\downloads\elastic-agent--windows-x86_64.zip' not found: open C:\Program Files\Elastic\Agent\data\elastic-agent-8d7885\downloads\elastic-agent--windows-x86_64.zip: The system cannot find the file specified.
	* call to 'http://nexus.test.ch/repository/proxy-raw-elasticagent/beats/elastic-agent/elastic-agent--windows-x86_64.zip' returned unsuccessful status code: 404

[elastic_agent][error] Elastic Agent status changed to "error": "component gateway-29ff4011: failed to dispatch actions, error: failed upgrade of agent binary: 2 errors occurred:\n\t* package 'C:\\Program Files\\Elastic\\Agent\\data\\elastic-agent-8d7885\\downloads\\elastic-agent--windows-x86_64.zip' not found: open C:\\Program Files\\Elastic\\Agent\\data\\elastic-agent-8d7885\\downloads\\elastic-agent--windows-x86_64.zip: The system cannot find the file specified.\n\t* call to 'http://nexus.test.ch/repository/proxy-raw-elasticagent/beats/elastic-agent/elastic-agent--windows-x86_64.zip' returned unsuccessful status code: 404\n\n"