Reducing Cavity-Pulling Shift in Ramsey-Operated Compact Clocks