All perfect praise be to Allah, The Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad is His slave and Messenger.
It seems to us, dear Sister, that you are affected with some kind of Waswaas (obsessive doubts); so first of all, we ask you to beware of getting carried away with these doubts, as this is indeed an evil.
The prayer does not become invalid by sitting on the heels in Tashahhud, and sitting in this position does not require performing prostrations for forgetfulness. Please, refer to fatwa 224401. Also, the prayer does not become invalid by mentioning the Name of Allah, because His Name is among the Athkaar (pl. of Thikr [expressions of remembrance of Allah]) of the prayer.
The jurists stated that if a person says a legislated Thikr in other than its place, then this does not invalidate his prayer, and it is recommended for him to prostrate for forgetfulness, but it is not obligatory.
Ibn Qudaamah said:
“The Second Category: What does not invalidate the prayer if one does it intentionally, and it is of two kinds:
The first is to mention a legislated Thikr, but not at its particular place, such as reciting (the Quran) while bowing or prostrating; saying the Tashahhud when one is standing in prayer; sending salutations and blessings upon the Prophet in the first Tashahhud; reciting a Soorah in the last two Rak’ahs (units of prayer) of prayers that have four Rak’ahs or in the last Rak’ah of the Maghrib; and so forth. If he did so out of forgetfulness, is it legislated for him to prostrate for forgetfulness? There are two views in this regard: one of which is that it is not legislated for him to prostrate for forgetfulness because the prayer does not become invalid by doing this intentionally, so it is not legislated to prostrate for doing it out of forgetfulness either, just like leaving the acts of the Sunnah (i.e. the sunnah actions which the Prophet did in the prayer). The second narration is that it is legislated for him to prostrate for forgetfulness, as the Prophet said, ‘If one of you happens to forget, then let him perform two prostrations while he is sitting.’ [Muslim] So if we say that it is legislated for him to prostrate, then this is only recommended and not obligatory.
The second kind is when the praying person says a Thikr or supplication that is not stated in the Shariah, such as him saying ‘Aameen ya Rab Al-’Aalameen’ (Amen, O Lord of the Worlds), or saying in Takbeer (saying: Allahu Akbar): ‘Allahu Akbaru Kabeera’, and the like, then it is not legislated for him to prostrate for forgetfulness for such matters.”
We have highlighted in previous fatwas that if the praying person did not sit completely straight after rising from prostration, in such a way that he remained leaning but not to the extent of prostrating, then his posture is sufficient and his prayer is valid.
Shaykh Ibn Taymiyyah when commenting on the hadeeth about the person who was at fault in performing his prayer, said:
“The Prophet, sallallaahu ‘alayhi wa sallam, said, ‘…then bow with calmness till you feel at ease ... and then prostrate calmly (and remain in prostration) till you feel at ease … and then sit with calmness till you feel at ease…’ He said about rising from bowing, ‘then rise from bowing till you stand up straight,’ because the one who stands, he stands up straight, and this is necessary to achieve calmness (Tuma’neenah). As for the one who is bowing or prostrating, then he is not straight. The one who is sitting is not described as completely straight as he may be leaning to some extent to one of his sides, especially in the Tawarruk position (in which one's buttocks are on the ground while the left foot is laid down and the right foot is held upright, and both are held out to the right), or leaning forward because the body parts upon which he sits are curved and not straight.”
Allah knows best.