thanks for sharing a workaround, though doesn't seem to work for me :/
I just tried remove download, set streaming/download to 256kbps, uncheck lossless audio, and didn't work to fix this unfortunately. For what it's worth I'm playing a smart playlist using Shuffle, which definitely used to update my play count, so not sure if the workarounds aren't working due to my listening setup.
Dolby Atmos is off, though I did previously turn it on just to try it out.
I also can reproduce the problem via AirPlay or playing on my computer. The only thing that does seem to update my play counts is explicitly tapping on a song on my iPhone or iPad (i.e. not via shuffle), or asking my HomePod to play a specific song, and then that'll eventually sync to my cloud library and in turn the Music app, but I don't think that is new behaviour
The AppleScript solution shared previously does not seem to permanently save, seems to be overwritten by a cloud sync within a few hours.
Either way, all of us seem to be having problems since 11.4 :/