Honestly, with Mercy’s larger focus on healing Ana is allowed to attack more often. Ana is the only one of the two with more offensive abilities in nature and a gun that can quickly heal or damage. If anything this enables Mercy to be the main healer and not have Ana locked purely into healing.
Though in general Mercy+Ana is really not a bad combination. You trade a bit of offensive for more sustains and utility. Ana/Mercy can both cover for one another. Ana has more usable AoE with some death preventative measure in ultimate. Mercy has limited AoE, but regular life reversal effects.
If not protected they are sort of screwed, but the stronger healer at times means Mercy can get away with more damage boosting as well or Ana can attack more often.
There is certainly synnergy with say bionade + valkyrie for either anti-heal on enemy + damage boost chain or heal effect + heal chain for higher sustain.