Well, in the light novel, Dazai meets his end. His death is a significant part of the story's development. It has a great impact on other characters as well. His departure leaves a void that can be felt throughout the narrative, and it also changes the dynamics among the remaining characters.
In manga chapter 109, Dazai survives. The plot doesn't lead to his death at that point. Maybe there are some intense situations, but he makes it through.
Dazai does indeed meet his end in the light novel. The circumstances surrounding his death add depth and complexity to the narrative, and it has a profound impact on the other characters and the storyline.
Perhaps in the fanfic's plot, Naruto discovers some dark secrets about his origin or the ninja world that make him feel so disgusted or hopeless that he wants to die. Like if he finds out that the very system he has been fighting for is corrupt at its core.