When you turn off the foam brush and the chemical still comes out, that is bad. It also says there is crap in the solenoid valve.
You want to check the plunger, usually their will be crap making it be stuck open. So you have to take the valve apart.
This is about as bad as I have seen. But usually the crap is smaller.
Sometimes the rubber plunger thing (last picture) can be messed up to allow a constant stream.