Former nanny here.
She is of course entitled to job hunt without telling you but she needs to work her notice.
That she is indicating she may not work her notice - and therefore risking no or a bad reference from you - suggests to me 3 possibilities:
1 she has done this before to other families - did you check refs including gaps in cv?
2 something about her current role is making her very unhappy - pay (are you paying at least the going rate for your area and the role she's fulfilling? Are you covering out of pocket expenses etc?) expectations, conditions,difficulties with one or more children's behaviour
3 something in her personal circumstances have changed meaning she needs to urgently change hours, location or similar (usual reasons for this are pregnancy, illness or needing to cover some care of an adult)
A good nanny would generally have the confidence to discuss if 2 or 3 are the issues, but also a good employer checks in with nanny regularly (I would say a monthly informal chat is good) just seeing how things are going, ASKING If there's anything that needs to be improved upon from either side or needs to be changed - sometimes this can be something as innocuous as a child needing a slight change to routine due to development but can be something as serious as the employer taking advantage or undermining nanny or even (sadly more common than many would like to admit) dad being an arse and sexually harassing the nanny.
There's a reason why she is looking elsewhere, if you'd like to hang onto her you're going to have to bite the bullet and approach her and ask what this is in such a way as to be open to anything she may have to say.
I left one job because one of the grandads was a creep and kept coming around unannounced ostensibly to see dc but actually to be a creepy pain in the arse! I'll be honest I didn't tell employers this was why, I said I was changing my hours to spend more time with my husband. I was young and naive and I wish now I'd told the truth, especially as I learned they lost the next nanny for the same reason.
I'm afraid I'm also concerned at your "leaving her to it" that rather sounds as if she is unsupported in her role and left with the majority of the mental load in caring for your kids.
There's a balance between being dictatorial and not taking any responsibility, can be tough to find.