BendyRuler height problem Arducopter 4.1.3

Hello everyone,
I have a quad with firmware 4.1.3 with a downward rangefinder and I want to test BendyRuler(OA_TYPE = 1) with my proximity sensor.
I drew a simple plan for it with a waypoint that is terrain.
As soon as autopilot detects an obstacle in its path it goes up and down illogically ( OA_BR_TYPE = 1 or Horizontal search). Also in the log file DAlt and SAlt go up and down illogically (autopilot want’s to go up and down but it’s not ordered).
When I test it without any obstacle in the path, it flies normally as predicted.
I will attach the log file. Does anyone have any idea, plz?
https://drive.google.com/file/d/11cPoFnSafQ6pt9yyRuOpP2hk4wVVWbIn/view?usp=sharing

I test again with OA_BR_TYPE = 2 and a similar result was obtained; illegal height change even when there is no obstacle seen by the proximity sensor.