Our '98 Dodge Xplorer had exactly the same problem. It would especially do this when going up hills where the engine had to work harder. It would sometimes shift back and forth from dash to defrost vents as you went up and down grades in rolling countryside.
We were able to get it fixed and I don't recall exactly what was done. I believe it had something to do with vacuum, as mentioned, but not just repairing a leak. I think there was a valve or switch that was replaced.
If I can find out I will respond again. It was annoying, but has worked fine after the repair.
David
Edit: removed an extra word