Can you explain the narrative shift of the final (4th) section of the novel?
Briefly, the narrator's identity is uncertain but most likely can be identified as "the writer" or "author of the novel".
The final section of the novel is narrated by an unnamed figure. As the text does not specify exactly who is speaking/narrating, readers are left to infer who it might be.
Susan Barton, Crusoe, Friday and Foe are definitely not narrating the story at this point. We can only surmise that a figure outside of the story is now giving the narration. This figure is outside the story, yet related to it as Barton and Foe are each related to the stories they tell (through their writing) in the preceding narrative of the novel.
The relationship of this narrating figure to the story is, perhaps, the figure's only important identifying characteristic.
In Foe, Barton muses on the nature on her relationship to her own story, as both a character in it and the teller of the story. This doubling of the narrator/story-teller role is futher complicated by her questions about the reality of her situation (especially whether or not her daughter is "real").
The novel moves further and further into a conjectural, meta-fictional space wherein the events of the story are no longer anchored to a fundamental "reality" within the text and this direction comes to its ultimate and abstract conclusion as the narrative perspective is changed in the final section.
Barton's questions are, in part, given answer in this final section. The "author" narrator is clearly seen here as a figure who "listens" to the world he has created and explores it as a subject of the world he has made, able to move bodilessly through it. The author is not the "god" of the story, but more of an angel, a spirit created in and by its own story.
This explains the odd movement between settings in the final chapter where the narrator is for a moment in Foe's house then is at Crusoe's (conjectural) shipwreck site where all the characters of the story have suddenly moved as well.
There is an implication that the entire story was born out of the narrating figure's meditation on this sunken ship.