I installed a light ware SF11/C straight forward on a done to make it avoiding/following walls to a specific distance.
Globally it works, when the drone reach the defined distance it stops or get back if it has lightly cross the distance.
I noticed that if I insist on making him go forward, he ends up going over the limit and goes towards the wall. Once the limit is crossed, it no longer seeks to move away from the wall and no longer takes account of the avoidance instruction.
I tested on 2 different drones (one with copter 4.0, the second with 3.6.9) and have the same result on both drones