I've also been experiencing this desynchronization with play counts & it's been driving me insane 😠
Like several others here, my issue is only songs played from my Mac update the play count or 'last plated' date. Nothing played from my iPhone—regardless of its download status—or HomePod is getting synced with iTunes, and is consequently breaking many of my Smart Playlists too!
I’ve been google searching & combing support discussions all evening, which lead me here lol, and have yet to find a viable ‘patch,’ much less an actual solution. I have seen a few people claiming they solved this type of issue via signing out of iTunes on their Macs/PC’s. I haven’t bothered trying that because I use iTunes as my music library, I’m an iTunes Match and Apple Music subscriber, and have devices (e.g., HomePod) that reply on said services.
There was one other suggestion I came across numerous times where people were able to restore play count syncing after de-authorizing iTunes on their computer, re-booting, and re-authorizing. However, the most recent reports of success were ~1yr ago by users running v12.7 & even then it seemed to be hit-or-miss.
Have any of you tried anything along those lines?