I think @peternlewis would have to chime in for sure, but I think Dropbox is actively making it harder to quit it via automation.
Given Dropbox's history of doing slimy and disrespectful things, this seems easy to believe.
I can confirm that Dropbox 93.4.273 does not quit when told to by Keyboard Maestro.app 9.0.5.
And it's not just Keyboard Maestro.
For example, this should work to quit Dropbox:
osascript -e 'tell application "Dropbox" to quit'
but instead it gives this error:
30:34: execution error: Dropbox got an error: User canceled. (-128)
I can assure you that the user did not cancel.
There is another option you can use. It's not as kind as an official quit, but if Dropbox is going to play dirty, well, then you have no choice but to use a bigger weapon.
Enter “Kill Dropbox Macro”
Here is a macro that will use the Unix tool
pkill to force Dropbox to quit:
Kill Dropbox.kmmacros (25 KB)
At its core, all it is doing is running a shell script:
pkill -x Dropbox
which you can use in place of Keyboard Maestro's "Quit Dropbox" action. The rest is just notifications.
Here is the full macro: