Thanks for the question! This behavior is likely caused by where the text was added on the arrow.
In draw.io, arrows (like most shapes) have two types of text:
Shape text – the default label that’s part of the arrow.
Floating text – manually added with the Text tool or double-clicking off-center, which creates a separate label that's not bound to the shape.
The first time, you clicked directly on the arrow and typed — this added shape text.
Later, you double-clicked slightly off-center, which added floating text, a separate text element that doesn't replace or edit the original.
To edit the original text:
Single-click the arrow to select it.
Press Enter or F2, or double-click right in the center of the arrow.
To remove the original text:
Select the arrow, then hit Enter, delete the text, and press Enter again to confirm.
To remove floating text:
Click the text (it selects separately from the arrow) and press Delete.
To save arrows that behave as expected:
Add text via the main shape label (not floating).
Remove any floating text before saving to your custom library.