Solved: LCD 1602 works fine plugged directly to UNO but not wired separately.?

Check the schematic of the UNO WiFi Rev2. I'm reasonably sure (not behind a PC at the moment) that A4 and A5 are not the I2C pins. Use the dedicated pins near pin 13.