Turns out Cakewalk's own MIDI Event Filter MFX can take care of this (i.e. block the All Notes Off, CC 123); it's just a little tricky because the interface is buggy.
Here's how to make it work consistently (go straight to step 7 after step 2 if you're goood with a mouse, and don't want to understand the bug, and how to work around it):
1. Insert the MIDI Event Filter in the MIDI FX bin for the track echoing MIDI to the synth (if you're starting with an Instrument Track, you'll have to split it to get access to the MIDI FX bin).
2. In the Event Filter dialogue, check the box next to Controllers in the upper righthand corner to enable that filter.
3. Drag the righthand range pointer at the top of the histogram down below the midpoint.
4. Drag the lefthand range pointer at the bottom of the histogram up above the midpoint.
5. You should now have a dark "exclusion" zone in the center of the histogram; these are controllers that will
not be passed. Note that the value at the top of the histogram is now smaller than the one at the bottom.
6. This is where the bug comes into play: You would think that to adjust the range to exclude CC 123 you could edit the top value to 122, and edit the bottom value to 124, keeping the exclusion zone by having the top number smaller than the bottom number. But if you do this, the values and exclusion zone will display as expected, but it won't work; it will
pass only CC123, instead of passing
everything but CC 123.
The trick is to edit the top number to 124, and the bottom number to 122. This will give the correct behavior (CC 123 is blocked, and sustain works normally with Dim Pro et al), and you will find that after closing and re-opening the Event Filter dialog that the numbers display correctly with 122 at the top, and 124 at the bottom. 7. The other way that works reliably (and intuitively) is to
edit the values using only the sliders, and drag the left hand range pointer on up until the bottom box reads 124, and the righthand pointer down until the top box reads 122. But this can be fiddly, because of the very fine mouse control needed to hit the marks.
8. And, last but not least, once you have this working, type something like "Block CC 123" into the Preset window, and click the save button so you can easily recall this setting. It might also be worthwhile to save a MIDI track template with this MFX already inserted.
9. Stop fiddling with SONAR, and make some music.