The use of SXA is rather important in this case.
As you can see in your configuration, SXA uses by default the
switchableLinkProvider. This will check your site configuration in Sitecore to determine if you defined a linkprovider there. If not (I assume you did not), it will take the fallback, which is defined here:
<setting name="XA.Foundation.Multisite.FallbackLinkProvider" value="localizedProvider" patch:source="Sitecore.XA.Foundation.Multisite.config"/>
As you can see, the default fallback is the localizedProvider and not "sitecore". So you are actually patching the wrong provider.
To fix this, you could patch the
localizedProvider, but I wouldn't do that. I'd rather add a new provider to the list and attach that to your site in SXA. How to do this can be found here: https://doc.sitecore.net/sitecore_experience_accelerator/setting_up_and_configuring/configuring/add_and_select_a_custom_link_provider : navigate to sitecore/content/tenant/site/settings/Site Grouping/site and in the Basic section, in the Link Provider name field, enter the name of your custom provider.