What setting controls autoplay of music/video apps when you walk away from your laptop?

On my Windows laptop, any paused audio/video app (Spotify, www.YouTube.com in a browser, etc.) automatically unpauses and starts playing. It’s super annoying. Is there any setting that lets me turn off this behavior?

Thurrott