Hi Jaime,
Could you give us an example on how the URL is changing? It is changing the full URL including the FQDN, or only the URI or the hostname..?
You could double-check the proxy rules definitions and comparing with your SharePoint external URL and your Virtual Hosts definitions as well, just to ensure everything is ok. You can take a look in the following location as well:
Configure Virtual Hosts on your Proxy Server - CA Single Sign On Agent for SharePoint - 12.52 SP1 - CA Technologies Docu…
You could also use a browser debugger tool like Fiddler to see when and why the URL is changed, so it could give you more tips on where the change is being produced, so you can verify the settings there (for example, if you are using load balancers).
Best regards,
Albert.