OpticalFlow adding error to EKF2?

I am trying to analyze the logs of an unsuccessful outdoor offboard flight. I noticed that the estimated trajectory is really different from GPS estimation, and i wonder if that’s optical flow’s fault(since ekf2_aid_mask was =3 so only optical flow and gps were used).

However, i did not find OPTICAL_FLOW_RAD parameter to plot on PlotJuggler(even though it appears to me on mavlink inspector inside QGC). Instead, i noticed the flag “position_reliant_on_optical_flow” was false on the entire flight. Looking at the source files and uORB graph I understood this is used by the commander, but i still dont get how it is calculated. Does this false flag mean something about the covariance of the Optical Flow sensor? Is it not being used then? Is it possible the optical flow sensor adds undetermined error to EKF2?

The flight was at night(outdoor was illuminated) and I’m using HereFlow sensor on PixHawk 2.4.8 with 1.13.3 PX4. It was supposed only to take off yet it drifted on x and y.

I added a image for the trajectory and uploaded the whole log here. Im aware the PID is bad and the (lack of better) light could have affected, but I’d still like to know what exactly the mentioned flag means and which parameter affect it.