Assume an "ideal" person that has a flat front, a fixed height, and zero thickness front-to-back.

If such a person has to get from A to B in vertically falling rain, then the rain intercepted will always be whatever is contained in a parallelogram (parallelepiped) with base equal to the person's height and "altitude" -- actually a horizontal measurement in this case -- equal to the distance AB.

That means that in this ideal case it matters not whether you run or walk slowly.

However, most people have a finite front to back thickness. If we allow for rain that lands on the top of the person, as opposed to the front, then the amount of rain encountered will be proportional to the time spent in getting from A to B, so the faster the better.

As far as comfort is concerned, as opposed to actual water intercepted, it is really a choice between a brief discomfort and a more sustained lesser discomfort. But my practical advice would be to walk backwards as fast as you comfortably or safely can.