As I said, I think she should make it abundantly clear that she wants the position regardless of her maternity leave. They can fill it temporarily just as they would have had to if she'd gotten pregnant six months after taking up the position.
You are missing a huge point in op post.
That she wont be there for the temporary cover and so, the person who will do the temporary cover will have an advantage when it comes to filling it permanently.
This is not about applying for the permanent job, it's about the op missing an opportunity to do the hob and go into the interview with a slight advantage. Instead someone else will had the advantage.
And she won't be there during the period that job will be temporarily filled.
If a job needs filling for 9 months, they can't fill it with someone who won't be in work, for the majority or all of those 9 months.
So back to my point. If op wants this opportunity and to do the temporary cover of this role in preparation for permanently filling it, the only alternative is a short a Mat leave.
Op, physically can not take her planned 9-12 month Mat leave and cover the job which (initially) is a 9 month secondment, during the same period.
So it's take the Mat leave or don't take the Mat leave for this opportunity. She can certainly still apply for the permenr role.
But she can't do it all in this case.