Praise be to Allah.
Menstruation is something that Allah has decreed for the daughters of Adam, and it is something natural that women are used to, so it is not permissible for a person to fall into something that Allah has prohibited to her, and that the Shaytaan makes fair-seeming to her, and say that that was because of shyness concerning menstruation.
In fact this is weakness and a failure to comply with the command of Allah, because shyness or modesty does not bring anything but good, but what happened, and many similar things that happen, is purely wrong; it cannot be the case that what made you do that was the kind of shyness that is praiseworthy according to the laws of Allah. The scholars are unanimously agreed that it is prohibited to pray during the days of the monthly period and postpartum bleeding (nifaas), and if the menstruating woman goes against that ruling and prays, then she is disobeying Allah and has committed a grave sin.
What you must do is repent to Allah, may He be glorified and exalted, from this grave evil deed and ask Him for forgiveness for your sin, and beware of doing such a thing again, no matter what the Shaytaan makes fair-seeming to you, and no matter what kind of excuses he tries to instill in your mind. True shyness is shyness before Allah, which means that you feel too shy before Him to commit this evil deed, namely praying without being in a state of purification and going against His command to the menstruating woman to refrain from praying.
An-Nawawi (may Allah have mercy on him) said:
The ummah is unanimously agreed that it is haraam for the menstruating woman to pray, whether the prayer is obligatory or supererogatory.
End quote from al-Majmoo‘ (2/351)
Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) was asked:
Is it permissible for a menstruating woman to pray, if she prays out of shyness?
It is not permissible for a menstruating woman to pray, because the Prophet (blessings and peace of Allah be upon him) said, according to the hadith of Abu Sa‘eed (may Allah have mercy on him): “Is it not the case that when she menstruates, she does not pray or fast?” This hadith is proven in as-Saheehayn. So she should not pray; it is haraam for her to pray and her prayer is not valid if she does it, and she does not have to make it up, because ‘Aa’ishah (may Allah be pleased with her) said: We were instructed to make up the fasts, but we were not instructed to make up the prayers.
It is haraam for a woman to pray (whilst menstruating) out of shyness, and it is not permissible for her to pray when she is menstruating, or to pray when her period has ended but she has not yet done ghusl. If she does not have any water, then she should do tayammum and pray, until she can find water, then she should do ghusl.
End quote from Majmoo‘ al-Fataawa (11/271)
For more information on the ruling on a woman who deliberately prays when she is not in a state of purification, please see the answer to question no. 65731
With regard to your leading people in praying Taraweeh at the time of your period, this was another sin, from which you must repent, feel regret, and resolve not to do it again. With regard to the prayer of those who prayed behind you, and were not aware of your condition, their prayer is valid, because of the report narrated by al-Bukhaari (694) from Abu Hurayrah, according to which the Messenger of Allah (blessings and peace of Allah be upon him) said: “They [imams] lead you in prayer, and if they get it right, then it is in your favour, and if they get it wrong, then it is in your favour but against them.”
In Sunan Ibn Maajah (981) it says: “The imam is responsible. If he does well, then he will have the reward and so will they, but if he does badly, then that will count against him but not against them.”
Classed as saheeh by al-Albaani in Saheeh al-Jaami‘ no. 2786
Al-Haafiz Ibn Hajar (may Allah have mercy on him) said: Ibn al-Mundhir said: This hadith refutes those who claim that if the prayer of the imam is rendered invalid, the prayer of those who prayed behind him is also rendered invalid.
End quote from Fath al-Baari (2/188)
Ibn Hajar said: al-Baghawi said in Sharh as-Sunnah: This indicates that if one who is in a state of minor impurity leads people in prayer, the prayer of those who pray behind him is valid, but he has to repeat the prayer.
End quote from Fath al-Baari (2/188)
Ash-Shawkaani (may Allah have mercy on him) said: This indicates that if the imam does something wrong, such as if he deliberately fails to comply with one of the conditions or essential parts of the prayer, then he is sinning, but there is no sin on those who prayed behind him because of his wrong action.
End quote from Nayl al-Awtaar (3/208)
Al-Majd Ibn Taymiyah (may Allah have mercy on him) said in Muntaqa al-Akhbaar: It is soundly narrated from ‘Umar that he led the people in prayer when he was junub but was not aware of that, so he repeated it but they did not. Something similar was narrated from ‘Uthmaan. And it was narrated from ‘Ali (may Allah be pleased with him). End quote.
See Nayl al-Awtaar Sharh Muntaqa al-Akhbaar (3/207)
And Allah knows best.