Hopefully this won't be considered a necro, but I'm also having this problem. I tried 2 different keyboards to see if it might be an issue with the keyboard, but it behaves the same regardless of keyboard.
The behavior is also inconsistent. Upon starting MusicBee the media keys will register for a while, but after some unknown time or even, they stop working unless I focus MusicBee. After this point, the media keys will typically work as long as the MusicBee window isn't minimized to the task tray, but that is a fully consistent behavior.
Thanks!