When rain is that heavy, open visor and drop sun-visor (if it's light enough).
Doesn't always work, but has saved me on occasion.
I use anti-fog solution on the inside, but it needs reapplying frequently and rain getting inside the visor will wash it right off as it's essentially Fairy washing-up liquid.
For the outside, I use MucOff cleaner and just wipe sideways with a glove. I am heavy on my kit, so Vee-Wipes don't last long and I still don't trust Rain-X (supposedly makes the visor brittle, as it's designed for glass not plastic).
If it's THAT bad - as it was for me a couple months ago where the spray was coming from 18" up the sides of vehicles, reducing visibility to 20' and we were doing serious motorway speeds - then you have no choice but to pull off and wait for conditions to improve - Believe me, continual eyefulls of stinging, salty, filthy water laden with road crap will soon prove how unsafe the riding conditions are!!