Matomo Tracker missing visits especially for non-logged in users

I detected a strange problem with Matomo tracker very recently (after upgrading Matomo a couple of days back). If I refresh a page, Matomo is not tracking the visit always. Moreover, for certain pages like Login page, Matomo tracker is not tracking the visit at all at times. But, if I login as a user in my website, I could not detect any such problem.

I am using Matomo with Wordpress. As far as I remember, there was no such problem the last time I tested the analytics nearly one month back. Initially I suspected there is caching issue of header file. But, if I login, the analytics does not miss any visit. I tried to root cause it, but I am unable to. Can anyone please help ?