The code base for the device contains several power commands (power, power on, power off, and power toggle). Indicate which power button turns the device off in device mode. Simply click the icon in the lower right corner, each command in the list, and then test the functionality using each command individually. If you test whichever command is appropriate, you can set that command as the default command for shutting down the device.
In active mode, the Denon settings determine the commands that automatically activate Denon control; see Devices--Denon----Edit----Power settings, where the default power commands are generally set to Separate power on & power off (depending on the results of your first test, reselect the correct commands). After saving, it should work fine.