For this, the samples of the instrument must be looped.
That is, you must be modifying a sound that can be held, such as Strings, Organ or Pad.
If the instrument meets these requirements, you should simply increase the "Vol Env Release" parameter to at least two (or more) times the desired length. For example, 4.5 seconds will be sufficient for a strings sound that is desired to be held for 2 more seconds after releasing the key of the keyboard. Because this "Vol Env Release" parameter decreases rapidly towards -144 dB, it is necessary to give a higher value than necessary to keep the sound at an audible level for the desired second.