There really should be at least a modal to confirm if the result will mean deleting more than say an album.
If you're offline or on roaming mobile data (not sure if they can reliably determine this though, at least not on iOS) when invoking it then they should make you answer a somewhat complex question to confirm that you indeed wanted to delete the songs.
Sometimes the changes get A/B tested, sometimes they don't. Sometimes the A/B test is gamed, sometimes it gets gamed by accident, and sometimes the tests get ignored when they are clearly wrong.
Finally, sometimes the directive is "get people to stop using this feature because it's unpopular with management".
Or that one time when they removed the "set as current playlist" feature, which they still haven't restored. That feature was the only way to change playlist without breaking in the middle of a song, besides literally waiting until a song is over and doing it then, wasting time.
I like Spotify, but they do some infuriating things sometimes.
Don't get me started on their beef with Apple which has resulted in my HomePods still not being able to take music requests via Siri almost 3 years after I got the first one.
When updating them, Spotify will first delete all old songs and then try to download the new ones. If a lot has changed and you're on a spotty Wifi connection this effectively deletes everything. Happened to me several times while on vacation.
There is the solution of enabling offline-mode before leaving for vacation, but as you mention it's very easy to accidentally disable it and once it's disabled all your playlists are toast.
Basically, the download button is a single down-arrow at the top of your library. When you tap it—and download your music–the down-arrow turns solid green to indicate your music is available offline. It doesn't disappear. It turns green, Spotify's primary color.
The kicker is: if you accidentally (or out of curiosity) press that green arrow again, it will wipe all your downloads without confirmation (disabling "offline mode"). Did that on a flight once and lost all my music. It's absurd how that UX made it out of testing.
Here's a picture of what I'm talking about. Tapping this icon deletes your library from your device:
https://i.imgur.com/zrSid1T.jpeg