Peace be upon you and God's mercy and blessings.
Ayatollah al-Uzma Sayyid Sistani (may God protect him):
If a person has followed a scholar who has passed away, and they do not know—at least in general terms—of any disagreement between the deceased's rulings and those of a living scholar on matters they are facing, it is permissible for them to continue following the deceased. However, if they are aware of such disagreements, which is often the case, and if the deceased was more knowledgeable, they must continue to follow him. If the living scholar is more knowledgeable, they must refer to him. If both are equal in knowledge or if the superiority of one over the other is not established, then if one of them is more cautious in issuing fatwas—meaning he is more diligent and careful regarding the factors involved in issuing rulings—then it is obligatory to refer to him. Otherwise, the individual is free to apply their actions according to the fatwa of either scholar, and they are not required to exercise caution between their opinions unless they have a clear obligation or evidence regarding a specific matter. For example, if one scholar rules that shortening prayers is obligatory while another rules that completing them is obligatory, the individual knows that one of them is obligatory for him. Similarly, if one scholar deems a transaction valid while another deems it invalid, he knows that he is prohibited from acting on one of the two sides—thus, he should observe the requirements of caution in such cases.
Ayatollah al-Uzma Sayyid Khamenei (may God protect him):
1) It is permissible to continue following the deceased in all matters, even in those that were not acted upon.
2) It is permissible to continue following the deceased in matters where one had referred to him during his lifetime; however, after switching to a living scholar, it is not permissible to revert back to the deceased, as a precaution.
May you be successful in all good.