Unfortunately your script still calls a third party domain, which is trivial to block using a generic AdBlock/uBlock rule. Instead, you should host the matomo script (under a different filename of course) on your own domain. That way it won't be as easily blocked.
I go as far as to send all the tracking parameters through a custom server script before they are proxied to GA and Matomo. That way, I can change the script and parameter names at will, making them much more difficult to block. For example, Matomo-related blocking rules are as follows:
/matomo-tracking.
/matomo.js$domain=~github.com
/matomo.php
/matomo/$domain=~github.com|~matomo.org|~wordpress.org
/piwik-$domain=~github.com|~matomo.org|~piwik.org|~piwik.pro|piwikpro.de
/piwik.$image,script,domain=~matomo.org|~piwik.org|~piwik.pro|piwikpro.de
/piwik./ping?
/piwik.js
/piwik.php
/piwik/*$domain=~github.com|~matomo.org|~piwik.org|~piwik.pro
/piwik1.
/piwik2.js
/piwik_
/piwikapi.js
/piwikC_
/piwikTracker.