I think it should work fine if the port numbers are different. I run 2 pgAdmins with 5050 and 5051 in the same browser instance. I didn't face any issue.
I have pgadmin4 running on a remote system which I shell into and forward the port required. This works great. I forward port 15050 to the remote system in order to connect to pgadmin on that system.
I also run postgresql locally on my machine. When I started firefox to connect to the local pgadmin instance running on port 5050 I got the error that the CSRF tokens didn't match. I assume this is just the way pgadmin security works when connecting to 2 different running instances with the same browser.
Fortunately, I can spin up a different browser (in this case opera) and connect to my local instance of pgadmin.
I just wanted to verify that this was the expected behavior.