Optical flow sensor is not used for altitude control

We are using a drone to go back and forth between different heights.
I am measuring the distance from the ground to get data on the ground surface, but when it goes over a cliff, it automatically rises to correct the altitude even though I have not entered throttle to get closer to the ground surface.

I have an Optical Flow Sensor connected to get the ground surface information and I don’t want to use anything other than the usual GPS, IMU, and Compass as sources for the flight.
Where do I rewrite the settings to disable the use of Optical Flow Sensor?
I am also attaching the current param and log bin. Thank you in advance.

FC: Pixhawk6X
GPS/Compass: Holybro mozaic-H
opticalSensor: H-flow(drone-can)