This is because refraining from standing ahead of the imam is, at most, one of the obligations of congregational prayer. All obligations are waived when there is a valid excuse, even those required in prayer itself; an obligation specific to congregational prayer is therefore all the more deserving of being waived. Thus, a worshipper is excused from whatever he is unable to perform, whether standing, reciting, covering himself, purifying himself, or anything else.
In congregational prayer, a follower sits during his odd-numbered units of prayer in order to follow the imam, whereas deliberately doing so when praying alone would invalidate his prayer. If he joins the imam while the latter is prostrating or sitting, he pronounces the opening takbīr and prostrates or sits with him in order to follow him, even though this does not count as a unit of prayer for him. He also performs the prostrations for the imam’s forgetfulness, even if he himself has not forgotten anything.
Likewise, in the prayer performed in circumstances of fear, a worshipper may pray without facing the qiblah, make extensive movements, separate from the imam before the closing salutation, and make up his first unit of prayer before the imam’s closing salutation. These and other actions are performed for the sake of congregational prayer, although doing them without an excuse would invalidate his prayer.
An even stronger example is the position of most scholars of Basra and most hadith scholars: if the regularly appointed imam prays sitting, the followers also pray sitting in order to follow him. They thus forgo the obligatory standing posture in order to follow him, as has been widely transmitted