People have already highlighted here that what you consider war crimes are actually legitimate war activities conducted by every serious nation. Enemy militaries must be deprived of electricity, water, logistical networks, and communications/connectivity. Given militaries use and take what they need from the locales in which they operate, the only way to successfully deprive them of these is to eliminate the civilian infrastructure as well. Civilians can't allow militaries to operate in their locality and expect to continue having access to modern utilities. Hence why any sensible civilians flee at the start of military operations in their region.