I am developing an IoT sketch at the moment, and have an isolated network for the devices I am testing. This isolated network does not have internet access.
If I make changes to the sketch while my Windows 11 machine is connected to the development network, then the sketch will not save (I get the nice error box asking me to copy using my favorite editor etc ). This is because the IDE attempts to always save the current sketch just before compiling, and for some reason, there is a dependancy to have an internet connection at that point. I think this may be associated with the cloud sketch feature ( but I'm not using it ) which seems to expect (and checks for) a connection to the arduino sketch cloud. I suspect that this might be an oversight ?
If, when I get that error, I change network connections to the internet accessible network, then the compile (and save) works fine.