Hmm. Using this file
unc.pl
base('//vboxsvr/swipl-devel/build.win64').
dll('//vboxsvr/swipl-devel/build.win64/src/table.dll').
so(X) :-
dll(DLL),
open_shared_object(DLL, X).
ll :-
dll(DLL),
load_foreign_library(DLL).
d :-
base(Dir),
working_directory(Old, Dir),
writeln(Old),
pwd,
ls.
?- so(X).
works. After restarting, ?- ll.
works and seems to have done its job:
?- current_foreign_library(L, P).
...
L = '//vboxsvr/swipl-devel/build.win64/src/table.dll',
P = [user:new_order_table(_, _), user:order_table_mapping(_, _, _), user:compare_strings(_, _, _, _), user:prefix_string(_, _, _), user:prefix_string(_, _, _, _), user:sub_string(_, _, _), user:table_version(_, _), user:new_table(..., ..., ..., ...), ... : ...|...].
But, changing directory indeed fails:
?- d.
ERROR: directory `'//vboxsvr/swipl-devel/build.win64'' does not exist
ERROR: In:
ERROR: [14] '$chdir'('//vboxsvr/swipl-devel/build.win64')
ERROR: [12] d at c:/users/jan/onedrive/documents/prolog/unc.pl:14
Now. Windows terminal cannot cd to a UNC path either 
First target seems to be loading DLLs. What is the difference what you are doing from what I do?
P.s. Please copy/paste text rather than images. I can copy/paste that and search engines can find it, helping others.