Unity 6 | NavmeshAgent Error

I cannot control a player with NavmeshAgent spawned in Unity 6. After spawning, “SetDestination” can only be called on an active agent that has been placed on a NavMesh." I get an error. The terrain is Baked. I load the navmesh component into another position in Inspector and it starts, it works without error. but As soon as I restart, this error persists until I move the navmesh while the project is running.