Make sure the 'sustain on' automation occurs after the start of your recording. Many people don't understand how MIDI works, they press the sustain pedal before pressing Record in their DAW, and then wonder why there's no sustain at the start of their playback. This is one of the key differences between recording audio and recording midi.
Other than that, I can't think of anything. The piano VST has no clue whether you're playing it live or whether it's being triggered by midi-lanes in your DAW, and will respond 100% the same to both. I guess there's another possibility that your DAW is for some reason not sending CC64 (Sustain) to the VST during playback, but I don't know why that would be.