In a simulation, the beings running it have so much power that there is probably nothing we could do to stop that. (Although if whatever the simulation is running on has connections to outside, it is theoretically possible we could exploit some bug from within the simulation to make changes outside that make their memory wipe not work...but this is probably extremely unlikely. It requires us to discover a bug and understand its implications and exploit it before the operators figure out they need to do a reset and wipe).
But this reminds me of another memory wipe situation I've wondered about. One of the common things in many tales of alien encounters is the aliens messing with the memories of those who interact with them.
Unlike with simulation operators, who are essentially gods to us with omniscience and omnipotence and completely unconstrained by any laws of science or logic that we know, aliens would presumably be constrained. They would not be omniscient and omnipotent--just more advanced than us.
So with aliens we would have hope of combating their memory wiping, or at least detecting it.
For example, if you often drive at night in isolated areas where you might be particularly vulnerable to alien abduction, you could keep some innocuous physical item in your car, such as a book with a bookmark in it, or a Rubik's cube, or a cassette tape of a band you hate. Pick an item that you can put in a certain state that is alterable, and have a standard state you keep it in. The bookmark is always on page 100, the Rubik's cube is always solved, the tape is always rewound.
If you ever see anything strange that even suggests "UFO", you alter the item. Move the bookmark to page 110. Add a couple twists to the cube. Start playing the cassette.
If you remain aware of the possible UFO until it goes away or you figure out what mundane thing it is you are seeing, you fix the item.
If, however, you either remember that you saw something but don't remember what happened, or you don't remember anything weird but find you have lost time, you can check the item and if it is out of its normal state you know that you thought you saw a UFO and now you don't remember it.
The idea here is that the stories of aliens usually include something making much of our technology fail so that we can't record them, and they also probably know enough about to us to recognize when someone who sees them writes a note on paper and so deal with that. But unless they have a way to read minds or extract and interpret memories, they probably won't recognize that, say, starting to listen to music is actually a form of note taking, and so won't know they need to rewind the cassette before they let you go with your memories wiped.
So...anyone of you actually do anything like that?
This is the theme of a few episodes of Doctor who. Characters marked there skin with a pen/sharpy, every time they saw an alien. The aliens automagically wiped the memory of anyone who saw them.
I wonder...how many times have they deleted our memories already?