I've been unable to update and release several scripts that use the delete command to remove a playlist because it doesn't behave correctly. Here's a video that shows the issue.
I attempt to delete a playlist. After the script is run each time, the selected playlist is, ostensibly, deleted. However, the Sidebar does not refresh correctly. So that the deleted playlist's title is still listed, and when selected, the tracks of an adjacent playlist are listed instead.
Music will ultimately refresh correctly after being restarted.