According to what has been stated in the risalahs of our respected maraje’, whoever cannot perform wudhu or ghusl for any reason, can pray the mustahabb prayers that have a specific time throughout the day with tayammum at the beginning of their time frame, given that one is sure that there problem won't be solved until the end of that time.
We would like to draw your attention to this issue:
“One who cannot perform wudhu or ghusl, can pray the nightly and daily mustahabb prayers that have a specific time frame that they need to be performed in with tayammum, even at the beginning of their time, given that they are sure that their excuse won't cease before the time for the prayers ends.”
Therefore, if you need to perform ghusl and know that you have the time to do so before the time for the night prayer is over and usually can get the job done by then, you can't substitute tayammum for ghusl or wudhu and pray the night prayer with it. But in the case of you knowing that you won't be able to do so before the time for the night prayer ends, you can.
Anyhow, if you have performed tayammum instead of wudhu or ghusl and the time for wajib prayers arrives, and you know that the problem that doesn’t allow you to make wudhu or ghusl will remain until the end of the time for the wajib prayers, you can use the same tayammum made for mustahabb prayers to perform the wajib ones.