Set up global shortcuts for media keys (next, prev, play/pause)
This solution is a bit of a workaround, but I think that it should work for you. 

First, you can write some AppleScripts that will perform the actions Next, Prev., and  Play/Pause. I found some examples here. If you are on macOS Catalina, you will need to replace "iTunes" with "Music", unless you only use Spotify and don't want to check for other open applications.

Next, you can create a Quick Action (also known as a service) in Automator. I found some instructions to do that here.

For each AppleScript (Next, Prev, Play/Pause), you can either save it as an application, and set the service to open that application, or you can have your service run the AppleScript directly by using the Run AppleScript variable in Automator.

When you save each service, give it a name (like next, prev, and play), as that will be what shows up in the shortcuts menu.

Now that you have 3 services, you can go to System Preferences -> Keyboard -> Shortcuts -> Services. You can now set a keyboard shortcut to run each service, which in turn should run the AppleScript to perform the Media Action you want. The services you just made should be in the General section, which is at the very bottom of the list for me.