You can either keep all your dialogue trees in a single dialogue file, or you can change the NPC’s dialogue reference through an event once the quest has been completed.
The first scenario requires you to keep a variable on your player that you’d save in a savegame.
The second scenario requires you to save the state of your level in a savegame, and then restore it, so your NPC would always reference the correct dialogue file.
I think the first one is easier and is more versatile. The two approaches can also be combined, if required.