Imagine we have $p_1 = -d\sin\theta\hat j$ and $p_2 = d\cos\theta\hat i$ and we have $\|p_1-p_2\|^2 = d^2$ As $ \frac{d}{dt}\|p_1-p_2\|^2 = 2(p_1-p_2)\cdot (\dot p_1-\dot p_2) = 0$.
Here we have $\dot p_1 = -d\cos\theta\dot\theta\hat j$ and $\dot p_2 = -d\sin\theta\dot\theta\hat i$ and as can be verified, $(p_1-p_2)\cdot (\dot p_1-\dot p_2) = 0$ so a virtual displacement is possible.

Resuming:
Considering the pentagon formed by the circles centers, and with $l$ the regular pentagon side, according to the attached figure we have
$$
\cases{
u = l\cos a\\
v = l\cos b\\
x = l\cos c\\
y = l\cos d
}
$$
and
$$
\cases{
v = l\sin a\\
x = l\sin b\\
y = l\sin c\\
z = l\sin d}
$$
so for virtual displacements we have
$$
\cases{
\delta u = -\tan a\delta v\\
\delta v = -\tan b\delta x\\
\delta x = -\tan c\delta y\\
\delta y = -\tan d\delta z
}
$$
For compatibility we need
$$
\delta x = \tan a\tan b\tan c\tan d\delta x
$$
or as a consequence
$$
\tan a\tan b\tan c\tan d = 1
$$
but in our setup we have $d = \frac{\pi}{2}-a$ and $c = \frac{\pi}{2}-b$ hence in this setup, the displacement is possible because we have
$$
\tan a\cot a\tan c\cot c = 1
$$