The premise "we don't have a way of generating and verifying a 2048-bit prime number with 100% accuracy" is wrong (if we trust the computers performing the operations): it has long been known practicable ways to generate randomly-seeded provable primes, and it is a (somewhat marginal) practice in RSA key generation (see FIPS 186-4 appendix B.3.2). We can even practically prove (or disprove) the primality of an arbitrary 2048-bit integer, using a method pointed in comment: Daniel J. Bernstein, Proving primality in essentially quartic random time, in Mathematics of Computation 76 (2007), 389–403 (which is a randomized test giving a certainty; only the time it takes to reach certainty depends on the particular randomness used).
However this is complex, and practical cryptography is happy with a (faster) probabilistic primality test. Notice that 64 rounds of Miller-Rabin test against an integer one has randomly drawn (which is the case in RSA key generation), rather than received from a potentially hostile party, are way overkill to rule out compositeness with residuals odds less than $2^{-128}$; 4 rounds are more than enough, see FIPS 186-4 table C-2, with justification in appendix F and its reference: Ivan Damgard, Peter Landrock, and Carl Pomerance, Average case error estimates for the strong probable prime test, in Mathematics of Computation 61 (1993), 177–194.
If we accidentally try to perform RSA with one of $p$ or $q$ composite, the usual formulas $\varphi(p\cdot q)=(p-1)\cdot(q-1)$ or $\lambda(p\cdot q)=\operatorname{lcm}(p-1,q-1)$ will lead to incorrect value, and with overwhelming odds decryption or signature verification will fail on the first real use (assuming a random message or proper padding is used). In a PKI context, the verification by the certification authority of the public-key certification request (which is customarily self-signed) will almost certainly fail.
A successful use of RSA constitutes a powerful primality test of $p$ and $q$ (about as powerful as a Fermat test with a random witness, that is less powerful than a Miller-Rabin test, but still very effective). However (just as all practical primality tests for large integers), it gives an indication of compositeness, but does not reveal a previously unknown factor; that's where the reasoning/intuition in the question breaks.