Collision prevention works for a few seconds, then CP it stops working and ignores walls

Hello, my issue happens as follows. I have configured the collision prevention on my drone using one distance sensor facing the front direction. With the drone on position mode, I start the flight and move towards a wall, and when the drone reaches the distance I have configured it to stop, it stops. Up until here, everything is fine. However, a few seconds later (maybe 10 seconds) the drone completely ignores the collision prevention and allows me to fly freely (still in position mode), as if the collision prevention got disabled. I don’t really understand why this happens, so any help would be grateful.

What’s your setup? Can you share a log?