Any tips for fixing navmesh Agent's wall-link behaviour

Hi, I just got back to this projet. I am using Unity’s AI navigation system on Unity 6.

Navmesh_navigation_wall_links

The cube is the target of the navmesh agent.
The green line is the agent’s path.

The navmesh links have a limited height here in order to give a better view of what’s going on.

As you can see the agent doesn’t go straight to the target and struggles in the transitions between corners.

Have anyone encountered that?
Am I supposed to fix that by manually setting the link’s destination point whenever the agent enters a link? How should I do that without rewriting a pathfinding algorithm?

You can see the links on each side of the side face of the wall in the scene view. There is one link for each corner of the wall that originally handles the cornering of the full height of the wall. I reduced their dimensions here to around half of the wall.

My main problem is with the incorrect pathfinding, the agent isn’t supposed to go up during the second link transition for this path here. It should go straight for the cube.

While I know the agent rotation isn’t great here, I haven’t tackled the subject yet.

Here is the navmesh agent’s settings and its rigidbody:

Here are the nav mesh links’ settings:

An other gif showing the nav mesh surfaces and the links:
Navmesh_navigation_wall_links_details

I moved the nav mesh surfaces and links in order to get a better visual.

Navmesh_navigation

It seems like the agent on a link only travels to either the corner of the link or the corner of a navmesh surface tile?

I rebaked my navmesh surfaces with a lower tile size and it fixed it!