Matomo being unreachable causes timeout on iOS webview

We’re using a self hosted Matomo install running in Azure cloud, and are using the default JavaScript tracking code provided by Matomo (example below). When our Azure instance became unreachable due to network configuration error that caused timeouts on iOS apps that embed our website in the app using iOS webview component. Android and web browser worked fine, as did Safari on iOS, but an iOS application times out when it cannot load the matomo page.

Matomo FAQ When the Matomo server is unavailable (down) how does this affect my websites loading speed and tracking data collection? FAQ - General - Matomo Analytics Platform says server being unavailable should not affect loading speed because it loads asynchronously but we found this not to be true on iOS webview. Has anyone figured out how to ensure the Matomo script doesn’t affect loading on iOS as well?

The tracking code we use is (exclude parameters and url redacted):

<!-- Matomo -->
<script>
  var _paq = window._paq = window._paq || [];
  /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
  _paq.push(["setExcludedQueryParams", [...]]);
  _paq.push(['trackPageView']);
  _paq.push(['enableLinkTracking']);
  (function() {
    var u="...";
    _paq.push(['setTrackerUrl', u+'matomo.php']);
    _paq.push(['setSiteId', '2']);
    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
    g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
  })();
</script>
<!-- End Matomo Code -->