Navigation Path Query need more than one physic frame

Godot Version

4.7

Question

I tried to make a navigation path query, but to get the path, I need to wait 5 physics updates. Is there any solution?

Example (wait 5 physics updates ):

Example (under 5 physics update):

Any help or solution is appreciated it. Thanks

Got the same issue some time ago. Is this stable with 5 awaits?
I did one await, had a for loop (for all my npcs), sometimes the path could be generated, sometimes not. (nav map not synced)

Try waiting for a process_frame instead and see

Depending on what is going on in any other scenes is it appropriate to wait for the bake_finished signal from the navigation region?

It is not about the baking, nav mesh are all baked. It is about the
NavigationServer2D.map_get_path or NavigationServer2D.query_path

using process_frame reduce the await to 4 and below that is return empty