Allow smooth voice stealing with MPE Synthesiser?

Hi, I’m making a synthesiser based off the MPESynthesiser class and a behaviour that I’m not sure how to solve is that when a voice stolen, it creates a discontinuity in the waveform
image
Is there anyway to allow for “smooth” voice stealing, so this click is not present?
I compare my synth with ableton’s operator to make sure it sounds right, and operator does not display these harsh click whenever a voice is stolen.

You can trigger a “smoothStop” function in your noteStop() voice’s function where you apply a little gain envelope for some milliseconds (how many process blocks that would be depends on your sampleRate, etc) to ramp down. Basically a release stage to smooth the transition