Tracks missing from Apple Music API listening history

I have a product that relies on the Apple Music API's "recently played tracks" endpoint. Recently, a few users are reporting that there are songs missing from their history. I was able to observe this myself—the issue corrected itself after re-authenticating with Apple Music, but unfortunately for at least one user this is not helping in their case.

What's odd is that there is some inconsistency about what shows in the recently played tracks endpoint. Some examples

My own account:

✅ Music from my playlists

✅ Albums and singles

✅ Apple editorial playlists

❌ Playlists created by other users

User 1:

❌ Music from their playlists

✅ Albums and singles

❌ Apple editorial playlists

❌ Playlists created by other users

In most cases, all four of these would appear in the recent tracks API. What could cause these tracks to be missing from the listening history endpoint? Listening history is already enabled for the devices they're using, but the songs are appearing inconsistently.

Tracks missing from Apple Music API listening history
 
 
Q