Found out that flight mode change can upset position controller badly if there is large velocity difference on target and current velocities.
Firmware version: ArduCopter 3.6.9 ChibiOS
What’s untypical on parameters:
Maximum flight speed on loiter is 12m/s where as maximum default speed on waypoint navigation is 2m/s.
The drone was flown about 9m/s on LOITER flight mode when AUTO flight mode was activated. The drone flied 90 degrees off from correct direction, while slowing down to 2m/s.