I mean, if you're going slowly enough that the rain is still coming straight down, a hat/brim will help. But even up into the double-digits for speed and the water is gonna get there. If the lenses of your glasses are polycarbonate (as most are), you can try a plastic polish called Novus. The Stage 1 "polish" does quite a good job of stopping water from building up on the lenses, kinda like Rain-X, but it's designed for plastics. Ride in the rain long enough, nothing is gonna keep the water off. Just try to manage it. In a pinch, good old carnauba wax will work as well.
__________________