No, not while nifas continues, in exactly the same way a menstruating woman may not enter or stay in a mosque during hayd. This is not a separate ruling invented for postpartum bleeding. It follows directly from the principle set out in are the rulings of nifas the same as hayd: the two states share the same essential nature, and the majority of scholars, across all four madhabs, apply the same restriction on entering the mosque to both.
The evidence is the same evidence used for hayd, and it reaches nifas by the same reasoning. Qur'an [An-Nisa' 4:43]: "Do not approach prayer while intoxicated or in a state of Janabah except passing through, until you have washed." Scholars analogize (Qiyas) menstrual and postpartum bleeding to Janabah in this ayah, since both share the same essential lack of purity. The hadith of Umm 'Atiyyah (Radi'Allahu Anha) is read the same way here: the Prophet (Salla Allahu 'Alayhi Wa Sallam) told menstruating women to stay away from the prayer-place of the Muslims during Eid (Bukhari & Muslim), and a woman still in nifas is held to the same instruction.
What still reaches her
Passing through the mosque briefly, without staying, is permitted in nifas exactly as it is in hayd, particularly when there is a genuine need to cross through it rather than go around. For Eid specifically, she may stay in a nearby place where she can hear the khutbah, make dhikr, and make dua without entering the prayer area itself. This has real practical weight, since nifas commonly overlaps with Eid al-Adha for a woman who has given birth close to Hajj season, or with a Jumu'ah that falls within her forty or sixty days. Dhikr, dua, charity, and the rest of what stays open during a bleeding state stay open here too; only the mosque, prayer, fasting, tawaf, and touching the Mushaf without a barrier are set aside.
When this restriction lifts
The restriction lifts the moment nifas ends and ghusl is performed, the same ghusl that reopens prayer and fasting. If bleeding continues past the recognised maximum, forty days on the predominant view, up to sixty for the Maliki and Shafi'i schools, as set out in how long nifas lasts, it is reclassified as istihadah rather than nifas, and istihadah does not restrict entering the mosque at all, the same way it does not restrict prayer, fasting, or touching the Mushaf.