QOL Tools: HUD - Distances is a Blender add-on that displays the distance between two selected items in the 3D view. The Superhive product listing describes its controls and compatibility.

Keep the measurement while items move

Lock the tool to the selected pair before moving either item. The listing says the measurement updates automatically as the items move or animate, so you can follow their changing distance.

Choose an axis view

Distance modes let you check X, Y, or Z, or view all axes together. The helper-line setting has on, off, and all-axes options. The distance modes toggle icon is at the top-right of Blender's 3D View.

Compatibility and license

The Superhive listing names Blender 4.2, 4.1, 4.0, 3.6, 3.5, and 3.4, and lists the license as GPL. Check the listing for current compatibility details before installing.