“The Prophet (ﷺ) used to teach us not to bow or prostrate before the Imam; when he says the Takbir then say the Takbir, and when he prostrates, you should prostrate.”
Sunan Ibn Majah Book 5, Hadith 158