I have a Treo 750 for Cingular/AT&T with Windows Mobile 6.
Back when I had Windows Mobile 5, I would start playing music using windows media player, turn on keyguard, and WMP would stop playing.

When the WM6 update came along, it seemed to fix the issue. But, gradually, the problem reared it head again and WMP would stop playing after about two songs.

Well I decided to revisit this issue after months of just not using the multimedia functions of the treo.
After a couple of chats with palm support I noticed that the issue would go away if I did a reset or hard reset then gradually worsen.

The problem is having other processes running in the backgroud.
After my last hard reset, i was able to listen to about 5 songs with keyguard on and no issues.
Then I opened IE, contacts and messaging. When I reactivated Keyguard, the music stopped after the current song. I killed all those processes and the issue went away.
It seems that the KeyGuard process looks for wmp, maybe in the Running Programs list. If its found it doesn't kill it, if it finds something else it does a global kill.

I've only been at this for an hour or so. But its been such an annoying issue that felt that i should share my findings.

Hope this helps.