Gps glitch and compass error in flight

hello.

I have a 5 inch build, with Kakute H7 as the fc and matek sam-m10q gps module with compass.
The fw i use is 4.5.0-beta1. When airborned, depending on the manuvers i make, i get errors like:
ekf imv0 emergency yaw reset, gps glitch or compass error and after that i start getting oscilations.
I usually have 20 sattelites detected, i have everything calibrated multiple times, but still get this issue.
I have attached my current settings and log file. The flight from the log is in Stabilize mode.
Another issue is if i fly in loiter or alt hold, when the glitches appear the drone flies away.

Any help for fixing this?
Thanks
config.param (20.7 KB)

And the .bin file - 1980-01-06 17-14-17.bin - Google Drive

Have you Methodically tuned ArduCopter ?

Especially the section about the position controller?