From "COVID-19 immunity plays a part in false negative testing, CDC says" by Genevieve Reaume, 2022-05-26 (about RAT but not PCR):
It turns out, according to the CDC, that people's immunity, either natural via infection or from the vaccines, is playing a part. Loeffler says what's happening is your immune system is doing exactly what it's expected to do, keeping the case mild. You may still have symptoms, but not enough of what's needed for the test to catch COVID early on.
"Their antibodies and their white blood cells are fighting that virus, and even though it's present enough to make you sick, it's not present enough that it's making enough of the protein that's detected in your nose to make the test positive," Loeffler said.
This means, if you have prior immunity, the CDC says you are more likely to get a false negative on a rapid test, especially in the early days of the illness. This is yet another reason why Loeffler says it's important to stay home if you're sick.
"You're most contagious just before your symptoms start and then those couple, three days after your symptoms start," Loeffler said. "For those several days of your first bit of the illness, even if your test is negative, please just stay home."