According to the Quran, a woman who is menstruating should fast and pray!
“They ask you about women’s periods. Say it is a distress (azan). Stay away from menstruating women…” (al-Baqara  222). Is it possible that the messenger of Allah could say something contrary to this verse?
The only prohibition regarding menstruating women in the Quran is sexual intercourse (Baqara  222). According to the Quran, ablution is invalidated by ritually impurities (due to sexual intercourse [junuban]) and the need to go to the toilet (al-Maida  6), but blood does not.
Therefore, according to the Quran, menstruating women should fast. If the woman has pain, then she does not fast because she is in the patient category, not because she has her period (al-Baqara  184). This decision is made by the woman herself, not by a doctor.
Those who care about our Lord’s decree, rely on and trust Him, they should fast and perform their worship during menstruation as well. But those who care about the opinions of hundreds of religious scholars who have been coming for centuries do not do these things. Anyway, we will all give our account to our Almighty Lord. The decision is yours!