General rule
The PostGIS extension must be in the user search_path as explained here
Detailed explanation
Using SET search_path TO "$user", public, postgis, topology; makes it immediately available while ALTER ROLE or ALTER DATABASE makes it available at the next session. But the latter commands make it persist through future connections.
Therefore, you would need e.g. to ALTER the user role with the following in addition to the immediate SET statement in your script if you want to use PostGIS in future sessions;
SET search_path TO "$user", postgis, topology, public;
ALTER ROLE user SET search_path TO "$user", postgis, topology, public;
A little warning
The order the schemas are set in the search_path is important because tables will be searched according to this order!
Credits, for having makingput me on the right track
With schema, function postgis_full_version() does not exist
https://stackoverflow.com/questions/2875610/permanently-set-postgresql-schema-path