This only works if "God" is not Omnipotent, nor Omniscient, and "Outside" of the system, but instead is a part of it, and was lying about those abilities all along.
If the universe were a simulation, "God" would be the operator of the computer system running the simulation, they are outside of...