Identify one threatened corner
Decide whether the recurring problem is the upper or lower branch, and whether it happens at entry or near the far edge. These are different geometry problems. A steep path may clear the near corner and still carry the body into the far one.
Use the solid branch ends as boundaries. The companion is represented by a collision circle, so aiming its center just inside the opening is not enough. Leave room for the body instead of trying to skim the branch for style.
Test a route with more margin
For an upper far-corner clip while rising, begin reducing the climb before the entrance. For a lower far-corner clip while descending, begin flattening the descent earlier. Keep the change modest so you can see whether it improves the intended clearance.
Do not replace the problem with an opposite-edge collision by making a large correction. Watch both sides throughout the branch thickness. The useful result is more room where it was missing without spending all the room on the other side.
Carry the observation into tighter gaps
Once the route is more consistent, notice how the same body margin becomes harder to preserve in later, narrower openings. This is a reason to control entry steepness and setup, not a reason to aim at a single pixel.
There is no displayed clearance meter in this exercise; you are making a visual comparison between attempts. Treat close calls as clues rather than precise measurements. If you cannot see which edge was threatened, return to a familiar earlier crossing and practice reading the whole corridor before applying the adjustment farther into a run.