When run via an action, the HKCU is that os SYSTEM not the logged, whereas via the debugger you are running in the logged in user content in user which is why you see it work via the debugger but not as a deployed action.
You should try the approach mentioned in Regset in HKCU hives - #3 by JasonWalker though do be aware that if the fixlet is relevant with no user if logged in, the action will still fail to set the user reg key as it wont be able to detect a user registry.