Media keys work for me on Mojave if iTunes is not running. They don’t when iTunes is open.
Except of allowing accessibility for Roon I didn’t set anything else for this to work.
I found the reason. I use Apple Remote Desktop to control the mini and changed the setting from “when controlling a computer: take complete control” to “share control with user”.