I see two 'DATA_EKF_YAW_RESET' events in the last phase of your flight. I am not an expert but I think because of compass failure or some magnetic field the yaw estimation encountered problems. Thay's why the Logs show different direction towards north instead of south.

The discrepancy between the logged flight path and the actual flightpath is the biggest headscratcher for me. If you draw a line from the point of divergence to the home position and mirrored the last part of the flight across that line, that would be the actual flight path.

Its as if the compass all of a sudden decided it to flip 180 degrees and the copter was calculating its position based on the IMU instead of the GPS.