search path is getting updated automatically
Let me pull out my crystal ball and see what you did...
Ah! I see you restoring a plain format pg_dump from an interactive session using \i dumpfile, so that the settings from the dump remain active in your session after the restore is completed.