Ramsey interferometry is routinely used in quantum metrology for the most sensitive measurements of optical clock frequencies. Spontaneous decay to the electromagnetic vacuum ultimately limits the interrogation time and thus sets a lower bound to the optimal frequency sensitivity. In dense ensembles of two-level systems the presence of collective effects such as superradiance and dipole-dipole interaction tends to decrease the sensitivity even further. We show that by a redesign of the Ramsey-pulse sequence to include different rotations of individual spins that effectively fold the collective state onto a state close to the center of the Bloch sphere, partial protection from collective decoherence and dephasing is possible. This allows a significant improvement in the sensitivity limit of a clock transition detection scheme over the conventional Ramsey method for interacting systems and even for non-interacting decaying atoms.