IOT Cloud configured Wifi Credentials not used by device

Hi developers,
In fault finding an intermittent connection/data issue to Arduino IOT cloud library from a generic ESP8266 programmed by Cloud App, I have found a concerning issue with WIFI connection changes. I changed the WIFI Connection in the Cloud Thing Setup page and uploaded by USB. The device still connected to the previous WIFI, but reported connecting to the new network. I checked the Sketch sketch secrets page and thingproperties.h which showed no issues.
To test the IOT cloud data connection/data issue, I have been running the device through a laptop hotspot WIFI with Wireshark recording the Hotspot network, and Putty recording the device serial. This was providing me with some connection information, but seemed to be different from normal access point connection, so I changed the WIFI SSID and secret in the Cloud Thing Setup page and uploaded by USB to a testing WIFI Access point that I can sniff. I know it loaded new code as the serial monitor said that the device was Connected to "new WIFI", but the Wireshark of the old WIFI hotspot clearly showed connection and packet flow each time the device is rebooted/power cycled.
I could ping the device on the old WIFI for about 10 seconds after the Connection is reported on Serial to the new WIFI, but then couldn't after that. The device does not connect to the Cloud IOT.
A second (without changing setup or code) compile and upload of the thing fixed the issue such that the device connected to the correct WIFI. Agent version is 1.7.0-87f097b.
This is very disconcerting as changing a device's WIFI from test to deployment environment may not work, but is reported as successful.

All I know is that I have always used the cloud editor and uploaded (I think it's OTA) and never had any cloud problems. I have noticed that people who complain about cloud development are almost always using both cloud and IDE. I know the tools are there to allow download/upload, but from the beginning, I was suspicious how well that might work.
My advice is to stay in the cloud and set the creds to what you want. Also, please note that there could be significant delays (as I once encountered) of at least 5 minutes in getting changes propagated to the board.