Partial meshcollider failure. Why does this happen?

I’m trying to generate terrain dynamically in my game. While doing this I encountered the 65000 vertex limit, so in order to work around this I have made a prefab and just instantiated the amount of meshes I need in order to cover my terrain.

the mesh algorithm looks like this:

visualMesh = new Mesh();
visualMesh.vertices = verts.ToArray();
visualMesh.uv = uvs.ToArray();
visualMesh.triangles = tris.ToArray();
visualMesh.RecalculateBounds();
visualMesh.RecalculateNormals();

meshFilter.mesh = visualMesh;
meshCollider.sharedMesh = visualMesh;

In 95% of the cases this works perfectly but sometimes when i change the size of a triangle or make a small change in the procedure to add triangles to this mesh, approximately half of the mesh looses its collision detection and players and other objects just fall through the terrain. The annoying part is that i don’t know why. When i change the size of the triangles in one part of the mesh, the collision failure happens in an entirely different part of the mesh.

Other problems may exist that I can’t see here, but I recall that colliders are finicky when you mess with them at runtime. IIRC, disabling / re-enabling them (even in the same frame) fixes certain issues like this.

I tried fixing it by looping through the meshes and disabling/enabling them on every update but it didn’t work.

the code looked like this:

void Update()
{
	for(int i=0; i < meshes.Count; i++)
	{
		meshes*.enabled = false;*

_ meshes*.enabled = true;_
_
}_
_
}*_
what other information do you need in order to figure out whats wrong with it?