We have a family plan in the house and whilst my daughter was listening to it today I heard a swear word, on checking it turned out restriction was on and working but the song wasn’t flagged as explicit within Apple Music.
I checked Spotify and it does indeed allow you to mark a song as explicit.
Here’s the equivalent in Apple Music, no option to flag.
I’ll raise a radar for this one if it hasn’t been raised already.