I've seen that procedure mentioned somewhere else. I imagine it will work as long as the keyboard is 100% dry on the inside. Any moisture in there when it's put back into use could be it's demise. I've ruined 2 or 3 keyboards by spilling liquid on them. If a spill occurs, the computer should be shutdown and the keyboard disconnected immediately.
Based my experience, any use of the keyboard where liquid has seeped down inside where it can affect electrical contacts will ruin it. So, just shutdown with the mouse, if possible, and don't touch a keyboard until it's been disconnected from the computer. Then do the cleanup and make sure it's completely dry before resuming use of it.
I've seen some nasty keyboards. I recall one that I believe should have been marked with a bio-hazard sign. Fortunately, basic keyboards are not very expensive. If the dishwasher technique fails, just replace it.