“The same commands (power on or power toggle) do not work inside a script…”
I have a very similar problem with my XBR-65X850C, but with a twist. The “Power On” and “Power Off” commands do work properly within scripts for a time. Then something causes those commands to stop working within scripts, but they still work in the Test Remote feature.
So far the only fix I’ve been able to figure out is to completely remove the TV device from the app, re-add the device, then re-add the commands to the scripts. This is really annoying to do every time the power commands stop working though.
I do not know what specifically causes the power commands to stop working within scripts but, on average, I’d say it happens every couple weeks. Not sure if it’s relevant but I have multiple iOS devices with the app installed.