@rolian, thanks for reporting back with such comprehensive information. That's a big step in diagnosis because it completely bypasses the logic in the macros I've provided in this thread.
You can jump straight to the the thread I've included below, but it would likely be helpful to first try Type a Keystroke two additional ways using default macOS System Preferences keyboard shortcut assignments:
1. Turn Dock Hiding On/Off
2. Show Help Menu
If either of the above does not function as expected, then I suspect you have a problem that could be addressed using the information included in this thread: Simulate Keystroke Not Working in Mojave



