That rule applies almost universally across the board. Comedies are rarely given the credit they deserve. Which is a shame, since it's often much harder to pull off a really good comedy.
I've said it before and I'll say it again ... the Oscars need a separate category for Comedy/Musical like the Golden Globes have. Expanding the single "Best Picture" category to up to 10 nominees is just pointless.
And yet I think both those roles - Miranda and Julia - had serious sides that she played sooo well, making each character far more textured and complex than most actresses could have achieved. Miranda's crumbling marriage and strained relationship with her children and her power struggles in her career; and Julia's quest to find herself and her heartbreak over not having children, as well as the quality of her relationship with her husband.