We can’t prove it. We can always suspect it is something different than what we think is in fact real. This image might help illustrate our dilemma.
We could be just brains in a jar. However, calculations are that it would take more energy than presently exists in the entire universe to maintain such an illusion, so it’s likely that what we see is real and there is no “matrix” hiding from us.