Disable media controls on the Windows 10 lock screen
In Chrome go to chrome://flags/#hardware-media-key-handling
and set that to "Disabled":
Explanation:
I was able to find a way to hide this feature per-browser. This is part of the Media Session API that browsers are implementing lately. You can disable it by going to your browser's flags config page and disabling media session service.
Source: Disable Media Control Overlays on Chrome and Edge browsers in Windows 10.
If you only need to disable the media controls overlay for Spotify (this seems to be the case), then you can do it from the Spotify side of things by going to:
Spotify (app) -> Edit -> Preferences -> Display -> "Show desktop overlay when using media keys"
Otherwise, I don't know how to help you
Sourced from here.
Cheers!