Yaw Error made Mavic Pro fly away 2,3 km

It was hovering, but it’s not able to hold its horizontal position when in ATTI mode. The speed was due to a mix between the wind and your stick inputs.

Make sure the Mavic is not near any type of magnetic metal objects while it’s powered on. Do these checks to ensure the compass is not be negatively affected before taking off.

The drone should not go into ATTI mode often. If that’s occurring often, you are likely either doing something wrong or your Mavic might be damaged.

If the mode changes to ATTI mode due to a yaw (compass) error, you should not attempt to steer the drone in any direction (other than up/down). If possible, land it in a safe area as quickly as possible. If there is no safe place to land, the only thing you can really do is increase the altitude to clear any nearby obstacles (including obstacles in the direction it’s heading).