There are 2 point of view s: He didn't die cuz when he was about to die fan yu from the future came to save him. The illusion was his father's memory so his father was unaware of the past events like what happened after he killed his wife and realised he killed his son he was upset and walked away from the cave. Then he created a false dream where he was reliving the same events. But years later fan yu and bai shou came to tell him the whole truth.
We can also assume this point of view: In illusion fan yu was mu jiu uncle and bai shuo was his aunty so in real time the child got saved by the uncle not fan yu. So his uncle and aunty saved him and then cultivate his soul for 500 years so that he finally got a body and that's how he was existing in the fan yu time. In the dream illusion they were just reliving the same events that actually happened. The evidence is that we saw bai shou tried everything to stop the catastrophe of the past but it still happened as it had happened in the past. So this theory can be true too. But in this case fan yu actually used his powers to change the dream and to make mu jia father's spirit realize that his son actually got saved and you was just unaware so that his spirit can die peacefully.
It's a pretty common thing in Chinese mythology where sometimes the divine creatures goes to past themselves to save their own future. So the time wasn't existent In the illusion that's why fan yu used it's magic to manipulate the past and after that the baby goes back to his timeline (600 years ago) but the fan yu and her mother's energy wasn't enough to give him a bady that's why her aunt used her powers and resources for 600 years to finally grow a baby from the soul and that's why he actually got birth in fan yu Timeline. According to the theme of the drama it was very necessary for mu jiu to witness his own family sacrifices to realise his responsibilities. They all showed it as a divine prophecy where a child will get birth with fox queen, divine lord and demon lord which will sacrifice himself to save the fox clan from a catastrophe.
Mu Jiu.. confused how he comes into existence years earlier before Fan Yue even changed the past... he was even…
They said time doesn't exist in the illusion (that's why past mu jiu and present my jiu were there at the same time) and fan yue was the strongest demon so his magic was stronger then the time. So after the resentment ended the baby mu jiu goes back to his timeline (1000 years before timeline) and fan yue crew to their timeline. That's how he survived and managed to see past. It was important for mu jiu to see all of his family sacrifices with his own eyes to grow up and take responsibility for his clan. So essentially fan yu didn't just tried to change resentment in illusion but also exhausted his powers to change the past baby birth. Moreover his mother and aunty also helped him and exhausted their powers to birth him. He was a divine creature got birth with a fox queen and divine lord so his destiny got saved by divinities of all past (his dead mother) , present (his aunt and uncle) and future(his friend fan yu). And his fate was to sacrifice to save the fox world and that's why heavens saved him and protected him. It's a pretty common mythology writing in a lot of cdramas. And in their culture too. I hope it will help.
He didn't die cuz when he was about to die fan yu from the future came to save him. The illusion was his father's memory so his father was unaware of the past events like what happened after he killed his wife and realised he killed his son he was upset and walked away from the cave. Then he created a false dream where he was reliving the same events. But years later fan yu and bai shou came to tell him the whole truth.
We can also assume this point of view:
In illusion fan yu was mu jiu uncle and bai shuo was his aunty so in real time the child got saved by the uncle not fan yu. So his uncle and aunty saved him and then cultivate his soul for 500 years so that he finally got a body and that's how he was existing in the fan yu time. In the dream illusion they were just reliving the same events that actually happened. The evidence is that we saw bai shou tried everything to stop the catastrophe of the past but it still happened as it had happened in the past. So this theory can be true too. But in this case fan yu actually used his powers to change the dream and to make mu jia father's spirit realize that his son actually got saved and you was just unaware so that his spirit can die peacefully.