Copter flip on takeoff with fake static GPS

i have developed an optical flow system running on nvidia tx2 companion computer with copter 4.07 pixhawk cube.

I am sending my NMEA position through the GPS2 Input and i am able to fly pretty good .

My optical flow start running 5 meters above the ground, so I am trying to reach 5m without using gps, by simply faking static gps position and sending it to the fcu.

I have tried sending a takeoff command through QgroundControl using guided mode and setting takeoff altitude via Qground slidebar interface. 3 out of 7 tries the drone just flipped with roll rates reaching 200 deg/sec).

any insight to what might be the cause would be very helpful
log file:
2021-07-23 18-50-10.bin (740 KB)