you possibly come from here about a project: ARDUINO IDE / PICO W / WEBSERVER / MQTT NO TLS / NodeRed trend & DB & operation / 4 Relay board / where i also try same code on the ESP32S3
on this win10 PC last setup after WD BLACK 250GB NVME drive died ( yes i got a new one for free as there is a 5 year warranty ) not have arduino IDE
i have a PICO W project that works under MicroPython 1.23.0 but not in newer versions micropython.org/download/RPI_PICO_W/ so i asked Twitter Friends and now filed a ISSUE github.com/micropython/micropython/issues/16792
i used JAVA only indirectly like with PROCESSING or first ARDUINO IDE