diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp
index 6fbc9a60b385a543cbe2dbd02c5dc5310c094bb2..e56fdaf321d784fe20ea20f0fb86624631831897 100644
--- a/Marlin/Marlin_main.cpp
+++ b/Marlin/Marlin_main.cpp
@@ -1551,7 +1551,7 @@ inline void set_destination_to_current() { COPY(destination, current_position);
 
       planner.buffer_line_kinematic(destination, MMS_SCALED(fr_mm_s ? fr_mm_s : feedrate_mm_s), active_extruder);
     #endif
-    
+
     set_current_to_destination();
   }
 #endif // IS_KINEMATIC
@@ -2362,7 +2362,7 @@ static void clean_up_after_endstop_or_probe_move() {
           else {                                        // leveling from off to on
             ubl.state.active = true;                    // enable BEFORE calling unapply_leveling, otherwise ignored
             // change physical current_position to unleveled current_position without moving steppers.
-            planner.unapply_leveling(current_position); 
+            planner.unapply_leveling(current_position);
           }
         #else
           ubl.state.active = enable;                    // just flip the bit, current_position will be wrong until next move.
@@ -2376,8 +2376,12 @@ static void clean_up_after_endstop_or_probe_move() {
           (void)bilinear_z_offset(reset);
         #endif
 
+        // Enable or disable leveling compensation in the planner
         planner.abl_enabled = enable;
+
         if (!enable)
+          // When disabling just get the current position from the steppers.
+          // This will yield the smallest error when first converted back to steps.
           set_current_from_steppers_for_axis(
             #if ABL_PLANAR
               ALL_AXES
@@ -2386,9 +2390,11 @@ static void clean_up_after_endstop_or_probe_move() {
             #endif
           );
         else
+          // When enabling, remove compensation from the current position,
+          // so compensation will give the right stepper counts.
           planner.unapply_leveling(current_position);
 
-      #endif
+      #endif // ABL
     }
   }
 
@@ -2396,24 +2402,23 @@ static void clean_up_after_endstop_or_probe_move() {
 
     void set_z_fade_height(const float zfh) {
 
+      const bool level_active = leveling_is_active();
+
       #if ENABLED(AUTO_BED_LEVELING_UBL)
 
-        const bool level_active = leveling_is_active();
-        if (level_active) {
+        if (level_active)
           set_bed_leveling_enabled(false);  // turn off before changing fade height for proper apply/unapply leveling to maintain current_position
-        }
         planner.z_fade_height = zfh;
         planner.inverse_z_fade_height = RECIPROCAL(zfh);
-        if (level_active) {
+        if (level_active)
           set_bed_leveling_enabled(true);  // turn back on after changing fade height
-        }
 
       #else
 
         planner.z_fade_height = zfh;
         planner.inverse_z_fade_height = RECIPROCAL(zfh);
 
-        if (leveling_is_active()) {
+        if (level_active) {
           set_current_from_steppers_for_axis(
             #if ABL_PLANAR
               ALL_AXES
@@ -9643,7 +9648,7 @@ inline void gcode_M355() {
   #if HAS_CASE_LIGHT
     uint8_t args = 0;
     if (parser.seen('P')) ++args, case_light_brightness = parser.value_byte();
-    if (parser.seen('S')) ++args, case_light_on = parser.value_bool(); 
+    if (parser.seen('S')) ++args, case_light_on = parser.value_bool();
     if (args) update_case_light();
 
     // always report case light status
diff --git a/Marlin/example_configurations/FolgerTech-i3-2020/Configuration_adv.h b/Marlin/example_configurations/FolgerTech-i3-2020/Configuration_adv.h
index a5fd5c5e6b6cf86f15c3b65dbe676474f711c34c..803fd44baed1af1c566c955269c14c3d12885b81 100644
--- a/Marlin/example_configurations/FolgerTech-i3-2020/Configuration_adv.h
+++ b/Marlin/example_configurations/FolgerTech-i3-2020/Configuration_adv.h
@@ -788,7 +788,7 @@
   #define PAUSE_PARK_Z_FEEDRATE 5             // Z axis feedrate in mm/s (not used for delta printers)
   #define PAUSE_PARK_RETRACT_FEEDRATE 60      // Initial retract feedrate in mm/s
   #define PAUSE_PARK_RETRACT_LENGTH 2         // Initial retract in mm
- 
+
                                               // It is a short retract used immediately after print interrupt before move to filament exchange position
   #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10  // Unload filament feedrate in mm/s - filament unloading can be fast
   #define FILAMENT_CHANGE_UNLOAD_LENGTH 100   // Unload filament length from hotend in mm
diff --git a/Marlin/example_configurations/M150/Configuration.h b/Marlin/example_configurations/M150/Configuration.h
index 49e8586aee66019d26a12f13d32f2778d18c2122..7a1a0eaf493704cc22c913ec39882ad038780b8a 100644
--- a/Marlin/example_configurations/M150/Configuration.h
+++ b/Marlin/example_configurations/M150/Configuration.h
@@ -318,7 +318,7 @@
   #define K1 0.95 //smoothing factor within the PID
 
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
-  
+
   // Malyan M150 example
   #define  DEFAULT_Kp 29
   #define  DEFAULT_Ki 2
diff --git a/Marlin/example_configurations/M150/README.md b/Marlin/example_configurations/M150/README.md
index f1dc0746ec7cc9b29a166e6cb006f9f981285313..1d3117769789ee3e6eca5cad383730f0ac04af92 100644
--- a/Marlin/example_configurations/M150/README.md
+++ b/Marlin/example_configurations/M150/README.md
@@ -1,3 +1,3 @@
 # Configuration for Malyan M150 hobbyking printer
-# config without automatic bed level sensor 
-# or in other words, "as stock" 
+# config without automatic bed level sensor
+# or in other words, "as stock"
diff --git a/Marlin/example_configurations/gCreate_gMax1.5+/Configuration_adv.h b/Marlin/example_configurations/gCreate_gMax1.5+/Configuration_adv.h
index 799acd32a4e76d4cbf20ef6b7b930832aee5bf3a..d5082fdb8b0109eee68cd8e9efb892b584ae1879 100644
--- a/Marlin/example_configurations/gCreate_gMax1.5+/Configuration_adv.h
+++ b/Marlin/example_configurations/gCreate_gMax1.5+/Configuration_adv.h
@@ -788,7 +788,7 @@
   #define PAUSE_PARK_Z_FEEDRATE 5             // Z axis feedrate in mm/s (not used for delta printers)
   #define PAUSE_PARK_RETRACT_FEEDRATE 60      // Initial retract feedrate in mm/s
   #define PAUSE_PARK_RETRACT_LENGTH 2         // Initial retract in mm
- 
+
                                               // It is a short retract used immediately after print interrupt before move to filament exchange position
   #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10  // Unload filament feedrate in mm/s - filament unloading can be fast
   #define FILAMENT_CHANGE_UNLOAD_LENGTH 100   // Unload filament length from hotend in mm
diff --git a/Marlin/pins_AZTEEG_X3.h b/Marlin/pins_AZTEEG_X3.h
index 7756a56e40d84fe27c278631bbaef193847ef467..efe9e2f0fca39c626d1c07e12eb8b0aeb8ad958f 100644
--- a/Marlin/pins_AZTEEG_X3.h
+++ b/Marlin/pins_AZTEEG_X3.h
@@ -74,7 +74,7 @@
 //
 // Misc
 //
-#if ENABLED(CASE_LIGHT_ENABLE)  && PIN_EXISTS(CASE_LIGHT) && PIN_EXISTS(STAT_LED_RED) && STAT_LED_RED_PIN == CASE_LIGHT_PIN 
+#if ENABLED(CASE_LIGHT_ENABLE)  && PIN_EXISTS(CASE_LIGHT) && PIN_EXISTS(STAT_LED_RED) && STAT_LED_RED_PIN == CASE_LIGHT_PIN
   #undef STAT_LED_RED_PIN
 #endif
 
diff --git a/Marlin/pins_AZTEEG_X3_PRO.h b/Marlin/pins_AZTEEG_X3_PRO.h
index a267cb6cc4a048fa3ea43c4b8cabc13da705f724..53ecb4c18c17396fdea2f1208151144949adf940 100644
--- a/Marlin/pins_AZTEEG_X3_PRO.h
+++ b/Marlin/pins_AZTEEG_X3_PRO.h
@@ -145,7 +145,7 @@
 //
 // Misc. Functions
 //
-#if ENABLED(CASE_LIGHT_ENABLE)  && PIN_EXISTS(CASE_LIGHT) && defined(DOGLCD_A0) && DOGLCD_A0 == CASE_LIGHT_PIN 
+#if ENABLED(CASE_LIGHT_ENABLE)  && PIN_EXISTS(CASE_LIGHT) && defined(DOGLCD_A0) && DOGLCD_A0 == CASE_LIGHT_PIN
   #undef DOGLCD_A0            // steal pin 44 for the case light; if you have a Viki2 and have connected it
   #define DOGLCD_A0      57   // following the Panucatt wiring diagram, you may need to tweak these pin assignments
                                 // as the wiring diagram uses pin 44 for DOGLCD_A0
diff --git a/Marlin/stepper.cpp b/Marlin/stepper.cpp
index 11b51285eeecbee689fa2f370ca364f001b11df9..4c35113e909dda7dbefb66a392cafcbc7d9c8075 100644
--- a/Marlin/stepper.cpp
+++ b/Marlin/stepper.cpp
@@ -586,7 +586,7 @@ void Stepper::isr() {
     /**
      * If a minimum pulse time was specified get the timer 0 value.
      *
-     * TCNT0 has an 8x prescaler, so it increments every 8 cycles. 
+     * TCNT0 has an 8x prescaler, so it increments every 8 cycles.
      * That's every 0.5µs on 16MHz and every 0.4µs on 20MHz.
      * 20 counts of TCNT0 -by itself- is a good pulse delay.
      * 10µs = 160 or 200 cycles.