not possible
try to imagine this from a software designer's view - you play some notes and want them to last, then you play some other notes and want the first few to drop off - how is the software going to know how many last notes are supposed to be heard? note that when you play a chord, its notes are actually never played at the exact same time
this would be ok if every chord had the same number of notes but what if you want to play different chords?

it suddenly becomes a complicated problem and not really a useful feature

(sorry for this part, I'm a software designer myself, couldn't help it

)
solution:
release the pedal for a short moment when playing "chord B"
if you do this right - "chord A" will stop the momment you play "chord B" and you'll press the damper again while still holding the keys so "chord B" will remain sustained