Put a home switch on each side, and when you home the machine, each side will home to their own switch. Adjust the position of one switch until it homes square.
Note that the switches need to each use a separate input pin.
What I used to do before I had home switches, was drive the machine into hard stops to square it up. Just adjust the stops so it's square.