When a gameobject is destroyed a chunk of the navmesh gets destroyed

I came across a problem during runtime with a baked navmesh. I have a gameobject with navmesh obsticals set to carve when stationary. This gameobject moves up through the map and stops until a button is pressed then it goes through the bottom of the map and gets destroyed. Sometimes when the gameobject gets destroyed it also takes a huge chunk of the navmesh with it, this causes nav mesh agents to teleport to whatever is left of the navmesh. Its weird but it seems to only happen if the gameobject gets destroyed. I was wondering if anyone has seen this problem before or if anyone can help me figure out why this is happening. I have a picture of the navmesh after a chunk is taken from it when the gameobject is destroyed. Thanks!

As of right now the only solution ive found is to disable the nav mesh obstical right before the object is deleted, deleting the active nav mesh obstical with the gameobject at the same time causes the chunk of navmesh to vanish.

Try deleting the object one frame after disabling the carving/obstacle as it takes one frame after disabling carving for the NavMesh to change back. Still not sure why it’s deleting the NavMesh permanently like that though.

“Note: When using NavMesh query methods, you should take into account that there is a one-frame delay between changing a Nav Mesh Obstacle and the effect that change has on the NavMesh.”