Restarting the editor reverts the build of an UStaticMesh

I’ve been trying to remove some triangles from my static mesh like this

    UStaticMesh* Mesh;
    UStaticMeshDescription* SMDesc = Mesh->CreateStaticMeshDescription();
    SMDesc->SetMeshDescription(*Mesh->GetMeshDescription(0));
    TArray<FTriangleID> TrianglesToDelete;
        //fill triangles to delete
    SMDesc->GetMeshDescription().DeleteTriangles(TrianglesToDelete);
    FElementIDRemappings Remappings;
    SMDesc->GetMeshDescription().Compact(Remappings);

    TArray<UStaticMeshDescription*> Arr;
    Arr.Add(SMDesc);
    
    Mesh->BuildFromStaticMeshDescriptions(Arr);
    Mesh->Build();
    return TrianglesToDelete.Num();

I need to call Build on my mesh or else vertex painting and UV channels go to hell. The problem is that when I restart the editor the mesh is unbuild and needs to be built again which resets my lightning data etc. Is there a way to save the state of the mesh after calling Build permanently?

Turns out BuildFromStaticMeshDescriptions was the problem here, the final pipeline is

OutStartingTriangles = SMDesc->Triangles().Num();
PickTrianglesToDelete();
OutRemovedTriangles = TrianglesToDelete.Num();

SMDesc->GetMeshDescription().DeleteTriangles(TrianglesToDelete);
FElementIDRemappings Remappings;
SMDesc->GetMeshDescription().Compact(Remappings);

auto MeshDesription = Mesh->CreateMeshDescription(0, SMDesc->GetMeshDescription());
Mesh->CommitMeshDescription(0);
Mesh->Build();