If I have one dot, it becomes a problem. but when there is more than one point due to the distance, it is difficult to rotate.emphasized text
When you delete curve endpoints, leaving only one point, the single point no longer has a tangent to align to.
Altering your setup as little as possible, one way round this would be to store the tangent on the curve's points while they all still have one, and then delete the endpoints:
.. and align to the stored tangent.