Unfortunately I did not find any error in the logs but from the screenshot it seems like pgAdmin4 is running with different user permissions which do not have access to Z: drive.
PgAdmin v 4.2.1 on Windows 10 running in Desktop mode
I am trying to open an sql fie in the query tool which is located on a network drive.
If I try to file open it mainly shows the attached physical drives and not the network drives, sometimes it does show the network drives but then when you start to go into them it pops up with an Error 5.
Could you provide us screenshot of error & pgAdmin4.log file with debug mode on?
This occurs when running PgAdmin4 as Administrator and as ordinary user.
If I use windows explorer and go to the file and select to run it using pgadmin 4 desktop runtime, it pops up with the main screen of PgAdmin and does nothing.