I have prayed behind Sunni Imams on few occasions wherein I had to do sajda on the carpet. Is my namaz valid in such circumstances? Do I have to pray qaza for those prayers?

If you are in a Taqiya state, where you fear for yourself or will be embarrassed if you prostrate on something on which prostration is valid, then you do not need to repeat