Discrepancy JavaScript and Tag Manager tracker

Going from Google Analytics to Matomo, I installed Matomo Tag Manager on our site, but noticed very low page views (only 1/10th of what Google reports). Trying to find a cause, I created a new test site in Matomo and installed the JS tracker from that also on our site. And this tracker reports pageviews much closer to what Google reports!

Visiting my site with an uncommon browser (so that I can easily find my own visit), I can see in the Real-Time Log that the tag manager setup reports only a few of the pages I visit (only 3 out of 15 pages), while the JS tracker reports all. But at the same time, the JS tracker says I am reloading/revisiting several of the pages, which I am not, so it is actually over-reporting pageviews.

Also, both report me visiting some of the pages with “www” in front of the domain name, and some pages without. This is not true, all visits are done without “www”.

Both trackers are implemented right after eachother in the source of every page, with the JS tracker immediately following the MTM code.

Why is the Tag Manager not reporting all pageviews?