The return of kasrah after al- or in iḍāfah does not mean that the noun now takes tanwīn like an ordinary indefinite triptote.
الْمَسَاجِدِ has no tanwīn because of al-. مَسَاجِدِ الْمَدِينَةِ has no tanwīn because masājid is the first member of iḍāfah.
Keep genitive marking and tanwīn distinct.