Using PlayMusic plugin
PlayMusic plugins allows the playing of a song list to a workspace or stopping the playing of music to a workspace.
Installation
Installation is the same as for every plugin. You can read more about that in Plugins article.
The plugin requires macOS 10.15 or newer.
Playing Particular Playlist
When you add this plugin to a workspace and click Edit, you may set a playlist you want to be played when the plugin is launched. You can also enable the Shuffle option to have your songs played in random order.
Stopping Music
You can also use this plugin to stop playing music when you finish a workspace. But you may also stop music once starting your work if you find it to be a distraction.
Troubleshooting
If you get an error saying Couldn't Communicate with helper application. Try your operation again. If that fails, quit and relaunch the application and try again. then it means that the plugin probably has no privileges to control the Music app. To solve that problem, go to System Settings → Privacy & Security → Media & Apple Music and make sure that PlayMusic is there and is enabled.