Edit: I would first run my Anti-virus scan and spybot program scan. If you have a virus or trojan it could be constantly trying to get focus.
Sounds like Vista or another program is continuously trying to take focus away from the game. You can duplicate this by ALT - TABbing while the game is open. Might be your screen-saver or a component on the sidebar if your using that.
First I would right click the game shortcut and click Properties on the resulting dialog. On the Shortcut tab, make sure it is set to "Normal window" in the Run drop-down.
On the Compatibility tab, under Privilege Level, check "Run this program as an administrator". I would also check "Disable visual themes", "Disable desktop composition". If the problem still exists you might try checking, "Disable display scaling on high DPI settings" but I would try that only as a last resort as I doubt it would have any affect on the problem. Make sure you hit the Apply button after checking the boxes. At this point try playing the game, if the same thing is happening try the following.
After doing the above, if the problem still exists, check "Run this program in compatibility mode for:" and try different compatibility modes starting with the newest and working backwards. With DD closed, set a mode, open DD and play, if it doesn't help, close DD, set a older OS compatibility mode, hit apply and try again till you find one that works.
If none of the above helps and you are using Sidebar,
try disabling the Sidebar and give the game a try.
Something seems to be pulling the focus from DD which is causing the resolution change you're seeing as the OS tries to take focus from DD and give it to the program causing the problem.
Hope this helps . . . =)