If the new mother is taking ordinary maternity leave, you must keep her original job open for her. If she is taking additional maternity leave, she has the right to come back to her original job or, if that is not reasonably practicable, to a suitable alternative job. You could have a hard job demonstrating that it was not reasonably practicable to reinstate her. The key point is that the new mother has a statutory right to return to her old job, and this outweighs any consideration about the relative merits of the replacement.
However, the new mother also has the right to ask for part-time work, which might solve your problem.