Question: What should I do if I read a Soorah within which there is a sajdah (prostration of recital) whilst praying [in congregation] behind the imaam?
Response: Do not prostrate because following the imaam is obligatory [and therefore takes precedence].
The prostrations of recital are a Sunnah, and in the case of a person praying in congregation behind the imaam it is not permissible to prostrate; If he intentionally prostrates with the knowledge that this [action] is not permissible, then his prayer is invalidated.
Shaykh Ibn ‘Uthaymeen source: fatwaonline.com