Autotakeoff sometimes turns 180° in the wrong direction

This doesn’t happen every time, maybe every 10th time, but I can’t figure out the reason. Arming_Check is 1 and while arming the airplane is heading in the right direction. If the error occurs, the airplane wants to perform a full left turn and i can only steer immediately with the aileron stick in the opposite direction.
Here’s an example:


The log file for it: https://www.magentacloud.de/share/f8o0wjzdke

Firmware Arduplane 4.06beta1

it would be nice if someone could help

Regards Rolf