Peace be upon you. If a person has followed a specific religious authority according to the correct conditions before their death (even in a specific matter by referring to them for precaution), it is permissible to return to the rulings they provided during their lifetime. However, if you wish to start following a deceased authority now, it is obligatory to follow a living, more knowledgeable jurist for initial guidance.
According to Ayatollah Khamenei:
1. If you followed the deceased authority correctly before their death, you may continue to refer to them in the matters you followed during their life.
2. If you want to start following them now, it is recommended to follow a living, more knowledgeable jurist.
According to Ayatollah Sistani:
1. If you followed the deceased authority correctly before their death, you may refer to them for precaution if they are more knowledgeable than the living authorities.
2. If you want to start following them now, it is not permissible to follow a deceased authority, even if they are more knowledgeable than the living ones.
May you be successful in all good deeds.