length is a physical quantity.
dot product is a mathematical operation.
and we do use the unit (Dimensions)
work done is the dot product of Force and displacement, right?
when you Take a dot product of Force and displacement,
i.e. ⃗f⃗. ⃗d⃗⃗ you multiply the components, and the unit becomes Nm aka Joule