That is the problem that I had with my first phone. See the thread that I started at:
http://forum.ppcgeeks.com/showthread.php?t=41423
It has nothing to do with the accelerometer. The screen should always switch to landscape when the keyboard is out (at least in the today screen, text messaging, etc). I ended up exchanging my phone at Best Buy and all is well. You should do the same.
Good Luck!