I experience the same as OP where spawn-monsters still allows hostile mobs to exist in the world while spawn-npcs and spawn-animals immediately delete their respective entities. There is definitely unintentional behavior going on here. Did these options all get added in the same update?
I have just experienced a similar, if not the same bug, in Minecraft 1.19.2 after my computer froze mid-game and I had to force shut it down. The strange thing is that I haven't edited my server list any time recently and I don't have any programs that would have modified it. I was playing on a server with server specific resource packs, so if that's linked to servers.dat that could be why the list got corrupted.
After loading the game, noticing the corrupted server list, and closing the game afterwards, my servers.dat is 1kb in size, whereas servers.dat_old is 70kb in size, but when opening it with a text editor it is filled entirely with an invalid character "Nul", except for the one not corrupted server at the top (I'm assuming Minecraft cleans up the corrupted text when it reads the server list). I'll have to test and see what triggers Minecraft to modify the server list and how probable it was that my computer froze while it was actively being modified.