I have both. Apple music is losless only if you connect an external dac to either an iphone or ipad through apple's proprietary cable known as CCK (camera connection kit). Apple TV is the worst possible method to hear music. It resamples everything to 48k. Even my macbook pro, macbook mini doesn't play lossless even though apple music app shows lossless logo. I have written about this issue in many of the posts and the internet is full of the mess that apple music is as of now.
spotify isn't lossless. But I prefer spotify because it has a better app. The music playback on the end device can be controlled from any device. Android, linux, iphone, ipad, windows. It works great with raspberry pi too.
The biggest reason I have stopped using apple music is because after carefully selecting the playlist and I start playing and quit the apple music, it totally looses the track that was being played. So in case I use apple music, I use last.fm to record what song was being played. Next day when I again open apple music, I go to last.fm to see the song that was being played yesterday. Itunes had the feature to start from the song which was being played after you quit. Don't know why this feature has gone but
spotify app has a amazing feature of AI DJ which recommend you the songs of your choice.