Possibly useful here
And I guess I n Ed to revisit
https://docs.v1e.com/electronics/dual-endstops/
I find so many description ambiguous and confusing while trying to figure this all out. Without contextual explanations it’s hard to evaluate…especially those gcode descriptions. “Set the current position” and “adjust the endstop offsets” are so vague without background or context and the detail matter. What does auto-home mean technically? If it includes the Z axis bad things happen. And does dual end stops mean 1 on X and 1 on Y or does it mean on both X min and X max and also on Y min/max? Yet more to learn and read…