I'm on a Samsung S20 FE with Android 12 and, like Josue, was also able to have dark mode change (enabled and disabled) trigger an action. Have you tried having just a simple action like "torch on" to see if the trigger of dark mode change is really the issue?