Ref. No. 1700/43-1338
In the name of Allah the most Gracious the most Merciful
The answer to your question is as follows:
It is obligatory on Musafir to shorten a 4 Rakat prayer into two Rakats only. However, if a musafir imam leads four rakats then the prayer of local followers will not be valid; they have to reoffer all 4-Rakat prayers that offered behind musafir imam. Because, the last two rakats were supererogatory for the musafir Imam and were obligatory for the followers. And it is not permissible to offer obligatory prayer behind a person performing a nafl prayer. Therefore, the prayers of the local followers are not valid in the above case. So it is obligatory on such people to repeat the prayers of four rakats.
''فلو أتم المقیمون صلاتهم معه فسدت ؛ لأنه اقتداء المفترض بالمتنفل''۔ (شامی ص ۸۲۷ ج۱)
And Allah knows best
Darul Ifta
Darul Uloom Waqf Deoband