This an optimization that many vector dbs use in retrieval since it is typically much faster to compute Euclidean distance rather than cosine.