I've encountered a similar issue with Spotify on my MacBook Air running macOS Sonoma, where the songs would randomly restart or jump within the playlist, disrupting the listening experience. After exhausting all possible solutions with Spotify's care team and experiencing no issues with Apple Music on my iPhone and Apple Watch, I believe this may indeed be a software compatibility issue with macOS Sonoma.
To troubleshoot this further, I recommend trying the following steps:
Check for any pending updates for both Spotify and macOS Sonoma. Sometimes, software updates can address compatibility issues and improve performance.
Consider resetting the Spotify app preferences. You can do this by navigating to Spotify Preferences > Advanced Settings > Reset Settings.
Temporarily disable any third-party extensions or plugins that may be interfering with Spotify's playback. You can do this by going to System Preferences > Extensions and unchecking any relevant extensions.
Try using Spotify in a different browser or in the Spotify desktop app to see if the issue persists across different platforms.
If possible, test Spotify on a different macOS device to see if the issue is specific to your MacBook Air.
If none of these steps resolve the issue, I recommend you should check out [spotimax.com] they have so many guides related to Spotify which helped me a lot to solve my queries related to Spotify.