Let $P$ be a set of $n$ points in the plane and let $D$ be the set of Euclidean distances determined by the pairs of points in $P$. Suppose that for each $d \in D$ there are at most $5$ (unordered) pairs $(A,B) \in P \times P$ so that $AB=d$.

Must $P$ contain a subset of points $P'$ of size $\Omega(n)$ so that the segments with endpoints in $P'$ have all distinct distances?

As stated, it seems like the answer is most likely no. For example, if all points from $P$ lie on the $x$-axis, then there exists a set $A \subset \mathbb{Z}$ with $r_{A}(x) \leq 4$ for each $x \in \mathbb{Z}$ such that no subset $A' \subset A$ of size $|A'| > 2|A|^{2/3}$ is a Sidon set. See for instance Dubickas, Schoen, Silva, Šarka, Finding large co-Sidon subsets in sets with a given additive energy, European Journal of Combinatorics, 34 (2013) 1144-1157.

However, what if we assume that say no line in the plane contains $\Omega(n)$ points from $P$? Can we extract such a subset $P'$? Are there any two-dimensional obstructions?