Had the same problem for a while and I strongly doubt yours is related to DPI settings.
In my case it was a software issue: the Logitech program that came with my G13 keyboard (on that keyboard every key is in fact programable, even if you program it to just send "Z"). In theory anything that sends or intercepts keystrokes bears the same risk: Logitech or Cherry software that came with your keyboard, Autohotkey, SuperF4, your motherboard software, DungeonHelper, Foobar extensions for remote control, a program for the buttons on your Razor mouse, programs to control your streaming software, even the build in shortcuts in Windows for the Gamebar, ...
The true cause I could never assess, but it seems related to lag: as if some program at some point registered that you began a sideways movement (no matter how tiny), but didn't register that you stopped it ... and therefore keeps you spinning around. And since DDO is so lag-prone and has an engine that puzzles and bewonders even PCP-addicts, it's bound to show up in DDO but nowhere else.
Quickly bringing the game out of focus always stopped the spinning, either a quick click on the dekstop if you're windowed or an alt+tab when full screen.