I think i had the same problem. Installing the edge-Gateway from the store on the PC where Codesys runs worked like a charm. Codesys was able to connect to the gateway and the gateway was able to connect to the PI which is on the same Network, but connected via wifi. Thanks @eschwellinger for the hint to install the edge gateway