Being a Hojjat is irrelevant of being passed away or not. For example Quran is a Hojjat for Muslims and is Hojjat for always.
If a person or a thing is a Hojjat for Muslims so all Muslims have obligation to obey and follow it/him.
Prophet Muhammad (SAWW) is a Hojjat for Muslims. So all Muslims have obligation to obey and follow him. And if do not obey ...
With respect to the meaning of Hujjah, it could be said that the word 'Hujjah' would be applied to the thing (matter) which we can infer or argue to it (as a brief description). (Read More... but source not in English)
The word "hujjah" has been used in different occasions in the holy Qur'an at verses like 4:165 and 8:149.
But in context to Shia Imams,
When Prophet Muhammad (SAWW) went to Moraaj, 3 other Imams were present on earth. They are Imam Ali a.s. and Imam Hasan a.s. and Imam Hussain a.s. so the earth has not been empty form infallible Imam.
There is a famous hadith among Shia that the Prophet (SAWW) said:
وَاجْتَمَعَ اَهْلُ الْقِبْلَةِ عَلَی اَنَّ النَّبِیّ صلی الله علیه و
آله قالَ ...
Quran says many Times.. ATEE-ULLAH-A WA ATEE-URRASOOL (Follow ALLAH and Follow Prophet Muhammad SAAW)
Quran Never said.. follow your aalims.
In Non Shiasm .. Muslims must follow only what Prophet Muhammad(SAAW) has told. if you are listening any Aalim or Imaam listen him carefully. But never apply all blindly upon yourself.