Either she thinks ML will stay for the baby, or that he'd at least have an heir and FL some consolation with a…
I think she's looking at both of ml and fl from her pov as she misses MXW and child is like feels less sad, it's like even if her husband is not here but lil of her husband (child) is here,so it feels less lonely...besides Ye Li felt loneliness for a long time too