You literally gave only 2 examples, and concluded it as a fact.😆
Karishma did steal the thunder in Dil To Pagal Hai from SRK-Madhuri, but it DID NOT impact Madhuri's role or performance at all.
Madhuri nailed her role too and I would say, she looked her best in the film.
As far as Devdas in concerned, it was a good ensemble film with decent performances by all. Also, I don't think Madhuri-Aish were ever pitted against each other for Devdas. They both did their parts and delivered great.
Whenever Madhuri has appeared in shorter-roles, she has stolen the limelight from others be it Lajja, Devdas or that mediocre Ye Raste Hain Pyar Ke . Even her "guest appearance" in Bade Miya Chote Miya was hyped so much that the makers made official posters that included her in the film.
So, NO. She never got sidelined during her prime.
38