As you’ve mentioned, it’s because the request still has to go through the Tyk proxy and is overridden there.
The actual value needed to do the rewrite is within the spec. However, the spec value only contains 4 properties for the Python plugin. So an overwrite with Python isn’t possible.
I should have explicitly mentioned this is really only possible with a Golang plugin as linked
With the exception of JavaScipt and Virtual Endpoint since they can return a response object.
Perhaps you could try using Go or the advanced URL rewrite. For the advanced URL rewrite, I converted my sample API definition into YAML format via operator. I haven’t tested it but maybe it could assist you in rewriting the URL