Can't control monitor volume with keyboard on 2018 Mac mini
I basically had the same issue when connecting my ViewSonic VA2265 monitor to my 2018 Mac mini using a HDMI cable. When selecting the VA2265 from the Sound pane of System Preferences, the volume was set to maximum and could not be adjusted. I can adjust the volume by using the controls on the monitor, but this was not desirable. Below is a screen shot.

The solution I used was to plug a stereo cable between the monitor and the Mac mini External Headphones jack. I then configured the monitor to select this jack for sound input. Below is a screen shot.

The volume can now be controlled from the keyboard.