Hello all,
I can confirm the restarting in safe mode fix works, and that it's also the 'official' Apple fix that I was given during a support chat with them.
However, after about two weeks of working, they stopped again.
At that point, I downloaded the wonderful High Sierra Media Key Enabler. I'm usually reluctant to download from third parties, but I am SO pleased with this, it's simple and it works like a charm. Obviously, this is only applicable for people that want their media keys ONLY connected to iTunes. That is exactly what I want and I'm so happy with that little app. It's free, but I donated, because I'm so pleased with it.
Apple told me that there was no way of finding out with what program the media keys are connected when they're not working in iTunes. Given the fact that somebody was quickly able to build an effective fix, I don't believe that.
They were not able to give the reason for this issue. He wouldn't confirm it's a bug, but I think it is. He said that apparently, at some point, the media keys get connected to a different program and are unable to 'switch back' to iTunes. The switching to a different program is apparently the advantage of the new feature: that the media keys 'follow' your actions, so that if you are in iTunes they operate iTunes, if you then go to an online video, for example, they operate that. That sounds great, but apparently doesn't work properly. Given the fact that iTunes is literally the only media program I use, and that I wasn't using anything but iTunes and Word for Mac at the time, there was nothing to switch to. Even though I'm happily using the media keys with the High Sierra Media Key Enabler app, I am still curious where the media keys went, so to speak.
Apple did confirm they would report it internally, and I have left feedback on their feedback page.