You cannot listen from multiple devices at the same time. You can have multiple logged in, but only one can be actively playing a time.
This wasn’t my experience. I was logged into Apple Music on my iPhone and whenever I logged into Apple Music on my web browser, it did play music for a while but then music would stop playing randomly and I was told something similar to what you mentioned about only one device being active. I had to reload the page to make that warning go away but it came again after a while. This was when Apple Music wasn’t being used on my iPhone, it was just logged in.
I don’t see how Apple Music can be considered a useful streaming service with this limitation unless one doesn’t possess more than one computing device (literally just an iPhone, or just an iPad, or a just a desktop/laptop and nothing else). Sounds absurd. This isn’t an issue with either Spotify or YT Music.
I use iTunes on the desktop, but I’ve only ever had it happen when I’ve been listening to music on my phone a minute or two prior. I’ve never logged out on either and if it was outside the few-minute window I was never prompted with that popup. Sorry it didn’t work for you, and that would probably be a dealbreaker for me, but fortunately that’s not something I run into.