I also had this problem connected CODESYS to UAExpert for the first time. In the device, I need to allow anonyomous log in. Follow steps 14 - 17 of the following tutorial: https://docs.factoryio.com/tutorials/codesys/setting-up/codesys-opc-ua-sp17/#creating-the-project