Connector attachment points change when you move the connected shape
A connector (Arrow A, let's say) is attached to one of the attachment points on a shape (we'll call it Rectangle B).
In code, you change the position of Rectangle B by modifying its .Left or .Top properties.
Arrow A becomes attached to the wrong attachment point.
If you detach the connectors from the shapes they're attached to before running the code that causes this, you can later attach the connectors to the correct shapes again.
Or change the height or width of the attached shape slightly. The connector will re-attach itself to the correct attachment point.
To solve the problem in code, one approach is to:
For each shape on the slide, check its .Connector property to see if it is, in fact, a connector.
If it is, check its .ConnectorFormat.BeginConnected and .ConnectorFormat.EndConnected properties to see if it's start or end points are connected to other shapes.
If so, .BeginConnectedShape and .EndConnectedShape will give you references to the shapes the start and end points are connected to, and .BeginConnectionSite/.EndConnectionSite will return Longs that indicate which of the shape's connection points the connector is attached to.
Record those values in whatever way suits your purposes, then use .BeginDisconnect and/or .EndDisconnect to disconnect the connector from the shape.
Then it'll be safe to move the connected shape (and if necessary, the connector).
Finally, for each connector on the slide, retrieve your reference to the connected shape and connection point, reset those on the connector using the .BeginConnect and .EndConnect commands.
Hint: It would be wise not to rely on the .Name property to retrieve the connected shapes before connecting them again. This explains why: