A very natural concept arises if you should insist that $A$ and
$B$ are small in some way, such as insisting that they are finite.
For example, the countable random graph under the shortest-path metric satisfies this version of the superposition property.
The reason is that any partial isomorphisms of two finite induced
subgraphs of the random graph extends to an automorphism of the
random graph. (Meanwhile, the random graph does not have the full superposition property, since it is isomorphic to a proper subset of itself.)
We might define that a metric space has the
$\omega$-superposition property, if any isometry of finite
subspaces entends to an isometry of the whole space with itself.
More generally, a space has the $\kappa$-superposition property,
for a cardinal $\kappa$, when isometries of subspaces of size less
than $\kappa$ extend to isometries of the whole space with itself.
This is a natural instance of what is known in model theory as a
homogeneous structure, a structure for which any partial
isomorphism of finitely generated substructures extends to an
automorphism of the entire structure. This is essentially what is
going on in your case, if you should restrict to finite $A$ and
$B$ (and if also you should insist that the larger isometry $F$ agree with $f$ on $A$). More generally, we have the concept of a $\kappa$-homogeneous
structure, for a cardinal $\kappa$, which means that any partial
isomorphism of substructures of size less than $\kappa$ extends to
an automorphism.
For example, structures arising as a Fraisse limit are always
homogeneous. Also, every saturated structure is
homogenous.