Following the imam until he finishes Tarawih
Question

The most correct opinion is that the number of rakahs for Tarawih is eleven, but I pray in a mosque where they do twenty one rakahs. Can I leave the mosque after the tenth rakah, or is it better to complete the twenty one rakahs with them?
Praise be to Allah.It is better to stay with the imam until he finishes, even if he is doing more than eleven rakahs, because it is permissible to do the extra rakahs, as the Prophet (peace and blessings of Allah be upon him) said: Whoever prays qiyaam with the imam until he finishes, Allah will record it as if he prayed the whole night
(reported by al-Nisaa'i and others. Sunan al-Nisaa'i, Baab Qiyaam Shahr Ramadan), and because the Prophet (peace and blessings of Allah be upon him) said: Prayer at night should be two by two (rakahs), and when dawn approaches, pray one for witr. (Reported by the seven; this version reported by al-Nisaa'i).
There is no doubt that adhering to the Sunnah of the Prophet (peace and blessings of Allah be upon him) is better and brings more reward, so long as it is done properly and without haste, but if it is the matter of a choice between leaving the imam because of the number of rakahs or going along with the extra that he does, it is better to go along with him, because of the ahaadeeth referred to above. At the same time, you should advise the imam to follow the Sunnah.