When you call refine, a entirely new mesh is created.
A mesh in DOLFINx only store the cell to vertex connectivity, geometry dofmap and the vertices at initialization.
All other connectivities has to be created explicitly as they can be quite expensive to compute.
However, for your example, I see no reason why you would need to create edges a second time.
Could you please provide the error you get if you remove the lines:
as your code runs nicely on v0.9.0 and v0.11.0 without those lines for me.
I guess the problem that you are observing relates to 3D linear elasticity code with fixed facets and tranction facets not converging - #9 by dokken