As a believing and practicing Muslim who also loves science fiction, I find the recent musings of some key figures (such as Elon Musk and Neil deGrasse Tyson) that "this world is a simulation" very fascinating. These quasi-philosophers (and I like to play one on the internet) say that we are all avatars, or characters, in some big simulation and nothing is "real".
We know from our religion that our souls (programs?) are created separate from our bodies (avatars) that exist only in this world. We know that the sun and the moon are precisely programmed (Quran, 55:5). In this world, everything we do is recorded by the angels in a scroll (our activity log).
We know that God created the universe in 6 days. In Islam, we have long accepted that these "days" are not like our 24 hour days, unlike Christianity. And part of the reason is that we know this universe took millions of years to take shape. And God says His day is not like our days. But consider that on His day 1 He ran Day1.exe. On His day 2, He ran day2.exe. I am just speaking in terms a computer layman can understand, but you get the point. The time inside a simulation does not mean the same time outside the simulation. We know this from our own simulations, such as SimCity or The Sims. And you don't even need time dilation to explain this.
Since Allah is the creator of everything (39:62, 13:16 etc), He is also the Creator of Time and Space.. He is not bound by constraints of Time and Space. That exists for us inside our reality (our simulation?).
Just to throw a spanner in the works: If it were proven that we live in a simulation, that would prove a creator, but not a perfect creator. Since our Creator is perfect, one would expect that the simulation would be perfect. If a simulation is only detected by its flaws, we would probably never know.
Then, Allah says in the Quran: "And what is the life of this world except the enjoyment of delusion." (Quran, 3:185).
The final answer: We probably wouldn't know. And after death (game over), we probably wouldn't care, except our final score!