Update:
When we try to connect to server from inside the Unreal Engine, it creates an incomplete connection string. Some of the fields goes missing. We do not encounter this problem on every computer, we don’t know why.
Error log on server side:

Connection strings (top one is the one with missing fields):
4Ú·)&\ó»EfS@À¨!
1NMУiy! ÒäJTP cmpfileclient84tagenableStreamshost[HOSTNAME]port[IP]sndbuf524288rcvbuf524288funcprotocolprogUE4clientù¡ú®ü·®ùù¶¹¡û¥²host[HOSTNAME]unicodecharset24clientCase1func user-info
<úCd.YòIE±¦ï@À¨
1NMÉö_ÏãBÃPß cmpfileclient84tagenableStreamshost[HOSTNAME]port[IP]sndbuf524288rcvbuf524288funcprotocolßßprogUE4client[CLIENTNAME]c:\Program Files\Epic Games\UE_4.26\Engine\Binaries\Win64host[HOSTNAME]user [USERNAME]unicodecharset6clientCase1func user-info