If a person inadvertently goes into sajdah before the imam, in the event that after saying the obligatory dhikr of sajdah he can go back and perform the sajdah with the imam, then based on obligatory precaution, he must say the dhikr and then go back. And the recommended precaution is that he should say the dhikr in the second sajdah which he performed to follow the imam. If he intentionally does not go back, the validity of his congregational prayer is problematic [i.e.
based on obligatory precaution, it is not valid]. However, his [individual] prayer is valid as per the details mentioned in