Using variables in proxy_pass implies, that the URI specified is a full one. Quoting the documentation:
A server name, its port and the passed URI can also be specified using variables:
This behaviour is not very intuitive, though it's how it works. Variables in proxy_pass were introduced
If you want nginx to use URI of the original request instead of the one specified in the proxy_pass, avoid specifying URI at all (note no trailing slash):
If you want to pass some changed URI, you can do so by using rewrite ... break in the same location.