With all my other drones I always used the mode that makes the drone brake and hover when it senses an obstacle.
I noticed with the M4Pro, if you use the "go around" mode, there is a setting called nimble. It's supposed to let you get closer to objects, but is apparently a little riskier, which...