Coronavirus tests often target the nucleocapsid protein (N protein), which is generally more conserved across the coronavirus variants (less likely to mutate). And many tests target multiple regions of the virus such that mutations in one region won't affect the overall test performance.
Here is a Thermo-Fisher coronavirus test for example. It targets three regions of the coronavirus. You might have heard of S-gene drop out or S-gene target failure with the Omicron variant. This occurs when a test fails to detect the S-gene due to mutations. You could use the Thermo-Fisher test here to identify the Omicron variant at point of testing versus the Delta variant, which typically didn't have S-gene drop out.
So don't worry about the coronavirus tests. You may need to test more than once. Generally if you are symptomatic or had a known exposure and test negative using a at-home rapid antigen test, wait a day or two and test again to confirm the negative result. Or you can get a PCR test which is more sensitive to confirm your status.
The FDA is constantly monitoring coronavirus test performance against the variants. In some cases a test will no longer perform well due to mutations in the virus and the FDA will note that here. Manufacturers in those cases have adjusted the test. But for the most part most coronavirus tests are still working well against the coronavirus variants as they were designed to be robust in the face of mutations.
If you were curious why the vaccines don't target the N protein, it is because those vaccine trials were not successful. The pharmaceutical companies pivoted towards the S protein (Spike) for the vaccines that we all got instead. There are vaccines in development that are trying again at targeting the N protein and other conserved regions of the virus for more variant-proof vaccines of the future.