but in the end, it was not since it already exists in the other domain
This is not a correct conclusion. Since this is a new OS instance, it's not part of any domain at all. There's something else going on here.
Also, the Apply Network Settings task does not perform the device join. That task simply configured the in-use unattend.xml file which in turn is used during Windows Setup (which happens during the Setup and ConfigMgr task) to perform the join. Thus, the success of this task in no way indicates that the join succeeded. To troubleshoot this, you need to review the Windows setup log files including netsetup.log and setupact.log on the device.