If Madhu is so close to kanhaji she's praying to him, it's expected like in other serials where a similar thing is shown, Saathiya in the beginning with Gopi and her mamiji torture that the evil deeds backfire to Leela. They can show a failure of her plans in a hilarious way, where everyone forgets the earlier negativity as they plans have hurt the one that was planning it.
A way to explain it is like during that nivaren of Pabho's they released the rats and because Dipali was trying a particular new expensive body cream (and on the label it says particularly attractive to rats) and Sikki was forcing her to apply it as he gifted her it, she applied it in the morning and the rats instead of going for Madhu they come on her and start biting her instead and she runs from they with the blind mice following, everyone has a laugh, Madhu does the prayers 1001 times and goes to the studio and does the scene with no problem, or the lake nivaren Madhu goes into the cold lake starts reciting 5001 times, and Pabho leaves from there and goes to the car and the driver has taken the car somewhere else to buy cigarettes or whatever personal use with the car, Pabh waits and waits he is not coming so she starts walking back and gets lost or drenched with a car with mud she comes back having fallen in the brush and walking slowly back, Madhu completes the nivaren and makes it back to the car and by then the driver has come back he takes her back home and they actually arrive before Pabho, who walks in later with tattered saree from the jungle she was walking in with mud splattered on her from the car and everyone laughs at the evil one's plans failing. (you get the idea). The previous serials I've watched the heroine always comes out mahan yes but because she is believing in a deity he protects her, and harms the evil ones. I think way MEIEJ fails is the villains win for too long and get of with a small slap on the wrist.