The change in context only applies within the same query from remote connections.
There is another quirk to watch out for, that functions defined this way, are not actually defined within the namespace (this is different behaviour than? if you loaded the script using \l.
It (switching default workspace) is one of the things that won’t work through IPC, whatever client you’ll use. Will only work in the script file being loaded locally on an instance.
As a side note,I’d refrain from setting default workspace for a number of reasons (most of which being general humanity for the readers of you’re code). ;)