Hello.
You know, the Shake Device trigger is not 100% exact. Sometimes it fires and sometimes it doesn't. It also depends on the strength used, the movement direction, etc.
Anyhow, if you haven't yet, you may take a look at MacroDroid's settings / Trigger Options / Shake Trigger. It has a few...