No, that's not right. The infanticide law was not ignored, it was followed to the letter.
For infanticide to be proven, the jury have to decide, based on the evidence put in front of them, whether the balance of the mother's mind was disturbed. The jury heard evidence from two psychiatrists and were not persuaded that it was.
If there was any issue with the way the expert evidence was presented, PM may possibly be grounds for appeal.
I saw upthread some people questioned how the psychiatrists report can be valid when they didn't examine PM until some time after the event. The psychiatrists will also have had access to the whole bundle of evidence, witness statements etc from the time, and their considered opinion will be based on all of this information. From what I read, even the psychiatrist appointed by her defence was a bit equivocal about whether the balance of her mind was disturbed, and did not suggest she had been suffering from psychosis.
It is still a tragic case for all concerned though and I hope that PM will be able to access support in prison.