Perhaps Naruto leaves to seek revenge against those responsible for Jiraiya's death. He might embark on a journey to find and face the enemies directly, not caring about the consequences or the rules of the village. His departure would then be driven by his anger and desire for justice.
One possible scenario could be that Naruto leaves to train in isolation. He might feel that he needs to become stronger on his own without the guidance of Jiraiya, and so he sets off to find new ways to improve his skills.
One scenario could be that Jiraiya is poisoned before his fight with Pain. In the fanfiction, an enemy within the village who is secretly working for Pain's forces might have poisoned his food or drink. So, when he goes to face Pain, he is already weakened, and this ultimately leads to his death. Another possibility is that Jiraiya's death is a result of a time - traveling plot. If there is time - travel involved in the fanfiction, his actions in the past might accidentally create a situation where he has to die to preserve the timeline.
His character may become more withdrawn at first. Losing Jiraiya, who was like a father figure to him, could make Naruto less open and more focused on his internal pain.
One possible reason could be that Naruto feels he has learned all he can from Jiraiya at that point. Maybe he has reached a level in his training where he believes he needs new experiences and challenges that Jiraiya can no longer provide.
One scenario could be that Naruto is poisoned during a battle. Jiraiya, with his vast knowledge of herbs and medicine, finds an antidote in time to save Naruto. Another possibility is that Naruto is trapped in a genjutsu created by a powerful enemy, and Jiraiya uses his own genjutsu - breaking skills to free Naruto.
One possible scenario could be that Naruto leaves due to a misunderstanding with Sasuke. Maybe Sasuke says something harsh about Naruto's skills and Naruto, in his pride, decides to leave. Another could be that Naruto feels he's holding the team back in some way and leaves to train on his own in order to become stronger without being a burden. Or perhaps there's a mission gone wrong where Naruto is blamed for something he didn't do, and he leaves out of a sense of unfairness.
One possible reason could be that Naruto feels he has learned all he can from Jiraiya at that point. Maybe he wants to explore his own path independently and test his skills without Jiraiya's constant guidance.
He is often shown as being extremely sad. Jiraiya was like a father figure to Naruto, and his death leaves a huge void in Naruto's life.
He might become more determined. Losing Jiraiya was a huge blow, but it could fuel his desire to become stronger and protect the village even more.
In fanfiction, Jiraiya's death can also be used to explore themes of sacrifice. He sacrificed himself for the greater good, and this can be further elaborated in different stories. For example, some fanfictions might show how his death inspired other characters to be more selfless.
In such a fanfiction, one possible scenario could be that Naruto sacrifices himself to save Konoha from an ultimate evil. Maybe a powerful enemy like Kaguya returns in a more menacing form and Naruto, seeing no other way, uses all his power and gives his life to seal the threat away.