I am trying to generate the following url, in the adminhtml area:
$this->url->getUrl('adminhtml/system_config/edit', ['section' => 'mysection']); // where $this->url is an instance of \Magento\Framework\UrlInterface
and the url is being generated correctly.
The only thing is that another security key is being generated as part of the url (I'm getting "Invalid security or form key. Please refresh the page." on the next page after I click the generated link).
How can I preserve the current key?