Problem seems to be, that the flash is taking precedence over all the commands.
On top, it will always return the lamp to the state it was before in brightness or off.
It will flash with the color the lamp has saved in its config to 100% and off again.
New color information will only be sent after the flash. That is also where the error comes from. You cannot set color without turning it on if its off.
So, seems like the only possible way to actually flash it with a new color seems to be to first set the color (turning the lamp on at the same time) while then turning it off again after a short delay. Then send the flash command.
That way the lamp will flash and then turn off again in the desired color.