Are you shutting down all non-essential programs before starting the game, especially anti-virus and anything network related (utility or monitoring programs, etc)?
Has your friend checked his firewall settings? Many routers have built in firewalls, which could block inbound connections from the game.
If your friend creates a new multiplayer game, can you join then? If so, can he then load the latest save from your current playthrough?
Did your friend try increasing the online visibility to friends only (if it is on invite only), or anybody?
Have you tried hosting?
Have you tried joining anyone else?
Have you tried hosting/joining an Arena match?
Try going into Arena mode, create an arena, open the Connectivity menu and check the settings, then exit to the main menu and try joining in the lobby. Alternately, create a multiplayer game lobby, exit and try joining.
If you are using any mods, try testing in a new profile without any mods enabled.
Try verifying local files: in the Steam library, right click on the game and select Properties, switch to the Local Files tab and then click on the 'Verify Integrity of Game Cache...' button.
With the GOG version, in the (optional) Galaxy client, select Divinity: Original Sin 2 in the left column, then click on the More button, and in the Manage menu select 'Verify / Repair'.
Have you tried different ways to join? If you and the host are both using the Steam version, or both GOG, there is the lobby and invite functions (and it may help to accept an invitation without the game already running).
There is also Direct Connection, with a Server ID (which the host can get in the Connectivity Menu after starting a new game or loading a save) or IP address. In the latter case, it can help if the host sets up port forwarding in their router to connect to the PC (ports 23253-23262 and 23243-23252), and then the clients should be able to connect to the external IP address.
LAN may be an option, but if you are not on the same local network, it would require VPN software, such as Hamachi or Tunngle.
If you use Discord, that may also be an option.
Try resetting your network adapters:
- click Start (or Search in Win 10), type cmd into the search box, right click Command Prompt and select run as administrator.
- type the following command and hit Enter
netsh winsock reset
- when that is done, there should be a message 'Winsock reset completed successfully'
- type exit and hit Enter, then reboot your computer.
For more details, see:
https://iihelp.iinet.net.au/Resetting_Network_Adapter_(Winsock_Reset)
If you can not join other people, either, try starting the game, switch to windowed mode and lower the game resolution (and maybe check the option to mute the sound volume when the game doesn't have focus), start a multiplayer game, hit Esc, open the Connectivity Menu, optionally disable online multiplayer (if it is enabled) and make sure LAN Connections is enabled (or that can be done in the options before starting a new game).
Next, start the game again from the 'EoCApp.exe' program file (doesn't matter if the first instance is started through Steam/Galaxy or the executable), select Join Online Game in the Campaign section, switch to the LAN tab, rather than Online, and try joining.
If that doesn't help, please email supportdos2@larian.com with a dxdiag report (WinKey-R, type in dxdiag and hit enter, then when it finishes loading click on the 'Save All Information...' button and save the report somewhere handy).
Also check the '..\SteamApps\common\Divinity Original Sin 2\DefEd\bin' folder for the network.log file, and if there are any CrashDump files being created, you can zip a few together to include.
It is normal that the main menu scene changes if you enter the arena mode or GM mode in that profile.