  Quantum sensors that use solid state spin defects have emerged as effective
probes of weak alternating magnetic signals. By recording the phase of a signal
relative to an external clock, these devices can resolve signal frequencies to
a precision orders of magnitude longer than the spin state lifetime. However,
these quantum heterodyne protocols suffer from sub-optimal sensitivity, as they
are currently limited to pulsed spin control techniques, which are susceptible
to cumulative pulse-area errors, or single continuous drives which offer no
protection of the spin coherence. Here, we present a control scheme based on a
continuous microwave drive that extends spin coherence towards the effective
$T_2 \approx \frac{1}{2}T_1$ limit and can resolve the frequency, amplitude and
phase of GHz magnetic fields. The scheme is demonstrated using an ensemble of
boron vacancies in hexagonal boron nitride, and achieves an amplitude
sensitivity of $\eta \approx 3-5 \:\mathrm{\mu T \sqrt{Hz}}$ and phase
sensitivity of $\eta_{\phi} \approx 0.076 \:\mathrm{rads \sqrt{Hz}}$. By
repeatedly referencing the phase of a resonant signal against the coherent
continuous microwave drive in a quantum heterodyne demonstration, we measure a
GHz signal with a resolution $<$1 Hz over a 10 s measurement. Achieving this
level of performance in a two-dimensional material platform could have broad
applications, from probing nanoscale condensed matter systems to integration
into heterostructures for quantum networking.
