Optical flow misbehavior

Hi there, I’ve been flying a drone indoors without GPS and am instead using the HolyBro H-flow sensor to get optical flow and rangefinder data. This is connected through the CAN bus. I have flown it several times in loiter mode with no issues, and it holds its position pretty well.

However, yesterday when put into loiter as usual (with no change in parameters from previous flights), the drone accelerated to the left and crashed. We checked that the optical flow sensor was not obstructed before this crash. Subsequent flights showed similar behavior. Today, flying again in loiter mode was perfectly fine, without any change in parameters from the previous day.

The log file from when the drone crashed is in this file: Crash logs. This is a screenshot of the optical flow data and Pixhawk 6C data from the file. As you can see, the optical flow and Pixhawk 6C IMU deviate significantly at one point:

The log file from the subsequent successful flight is in this file: Subsequent successful flight

Does anyone have a hypothesis as to why this occurred? I would like to know if this can be avoided in the future.