Question: What determines the actual moment when the soul will leave the body?

Sri Chinmoy: The last note of the song is played either by the soul or by some being or representative of the Supreme. It is like what happens when a machine is turned off in a factory. There are many workers who know how to turn off the machine. The machine has been running for a long time and then the manager says, “Now one of you turn it off!” He does not point to someone in particular and say, “Do it immediately!” He only says, “Now we shall stop!” Sometimes a few days or even a few months will go by before it happens. In some cases the manager will say, “Do it immediately!” In that case, death may come abruptly. But in other cases, he says, “One of you turn off the life-machine.” The workers are taking their own time, and the manager is not very strict. Then, after some time one or two of the workers will say, “The manager said to turn off the machine. Let us do it; otherwise, he will be mad.” Then one of them goes and turns off the machine.

From:Sri Chinmoy,Sri Chinmoy answers, part 7, Agni Press, 1996
Sourced from https://srichinmoylibrary.com/sca_7