Window manager freezes when triggering Exposé on macOS Sierra?
It's still happening with maOS Mojave 10.14.1.

When it happens to me, the OS isn't frozen, only Expose is. Music keeps playing, I can receive notifications, etc.

In this case, try adding to Dock an icon that will restart Dock:


Open Automator
File -> New -> Application 
In the search field, pick Run Shell Script
In the text area, type: killall Dock (capital D on Dock)
File -> Export
Save it as "RestartDock" in somewhere convenient
In Finder, open the directory where you saved the app and drag it to Dock


When the bug happens, try clicking on the app from Dock.

Credits to https://www.addictivetips.com/mac-os/how-to-restart-the-os-x-dock/