It's the bug that's been haunting Sonar since the 'A' release. Drives me nuts! One of the monthly releases actually claimed to fix this but it still happens.
When it happens, you have to hit the vertical zoom (plus or minus) to get the keyboard to sync up with the MIDI lanes. Usually once you have done the zoom the bug won't happen again on that MIDI clip. I've seen it more often when using MIDI clips (dragged in from the browser or from a VST) but what exactly causes it to happen has never been fully worked out.
I wish the Cakewalk developers would work backwards on this bug. Assume the MIDI lanes and keyboard aren't in sync, then work backwards and figure out ways the PRV could get into that state. Next time it happens for me I'm going to use Visual Studio and capture a full debug dump of the running Sonar, like what the crash reporter does only with even more data and not requiring a crash. Maybe that would help them, assuming the support group bothers to pass it on.