SongShift also works really well in my experience. I only use Apple Music in the car these days because its UX is safer/saner than Spotify's. SongShift makes it easy to keep them synced up.
That may be what you're talking about, since clicking on the heart icon is how songs end up in "Liked Songs" to begin with...? Note that I only use it in the Spotify -> AM direction, not vice versa.