Hi,
Your question is very fragmented so hopefully I understand.
My understanding is, you are using WABde (on a server).
QUOTE: Now if I launch my Portal site from the 2nd URL, it launches the WAB Dev and doesn't see my sites.
Portal does not launch WAB de. WAB de runs on its own, with Node.js on a default port of 3344.
WAB de is completely standalone. You can delegate which Portal the WAB de uses.
It sounds like you are using Web Application Builder IN Portal. This is NOT WAB Dev or what I call WABde (developer edition).
Going forward...
In the .zip of a WAB Web App... there is a config.json file in the root of the app.
In here there are two URLs that have the URL of the portal or AGOL that is used AND the appID which is "itemId": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
thats all that is needed. However, there are some specifics that may break depending on what is included in the app..
e.g. Summary widgets.