The farther a chord moves from the center, the shorter it becomes.
The radius, the perpendicular center distance d, and half the chord form a right triangle. Pythagoras gives (L/2)²+d²=R². A diameter is the longest chord; as d approaches R, both endpoints meet.
The perpendicular distance to a chord is not the distance to one of its endpoints.