I have this issue and it came in a really alarming way where Music decided to revert all data 5 days back. I lost ratings, play counts, songs distributed to different playlists. I am very uneasy right now. A few safe mode restarts seems to have helped that, meaning I can make changes and they are saved. Maybe. Who knows if it will randomly lose them all again. I have become very paranoid. 20+ years of iTunes data at risk here.
But no matter what I do, I can't rename playlists, so here I am. Interesting to note that I can attempt to rename a playlist, and exporting the itunes/music library shows the correct new name! But when I restart the Music app the playlist shows the old/wrong name. What a lark.
I spent about an hour on chat with Apple Support. Very frustrating. It was difficult for the first person I chatted with to understand that I do not use iCloud library or subscribe to apple music. At one point they insisted I couldn't sync my own added music unless I have a subscription. And they insisted that playlist data is not stored on the Mac. (... ... ... ... Yeah. This was a huge waste of time.) But I can now verify that creating a new user on my Mac and trying to rename playlists on that user's pristine Music app also doesn't work.
Eventually (by the second person) I was told apple engineers are working on this issue so keep an eye open for macos and ios updates. Let's hope so.
Also my phone won't sync with Music anymore. So that's fun. (Rather, it synced...in that my Music app got the play counts...and some items were removed from a playlist but not other playlists...but none of the changes I make in the Music app will show up on my phone. This was right before Music lost all that data. yep.)
I guess all I can do is pray to the apple gods. I have lost a lot of faith in them.
maybe they'll even fix the issue where cover art is all mixed up on my iphone. That'll be a real miracle.
/end depressed rant
Oh, another interesting thing I noticed: At one point I COULD rename NEW playlists. That is, I could create a playlist (which was progress from a few hours ago, when I couldn't), and then I could rename it. UNTIL I tried to add an * or a < (or a number?) to the name. It did not save that change, and going forward it could no longer be renamed. At this point, some sad hours into this annoyance, I can't rename new playlists at all. BUT I can rename SOME old playlists...I can't figure out what does it but it might be ones that never had a special character or numbers in their name. Then randomly as I experiment, I can't ADD any new playlists anymore. (Restart the Music app a few times, then magically I can.) This is bizarre.
Also I found this thread from Sonoma 14.2.1 Mac Music App Not Saving Changes - Sonoma… - Apple Community
so this may have been going on for longer?
And even older: iTunes not saving changes. - Apple Community