Thermodynamics of nanodomain formation and breakdown in scanning probe microscopy: Landau-Ginzburg-Devonshire approach | Synapse