Is there a way to execute anonymous code in a way that existing data on the org is not accessible, like when test methods execute?
A proper test method cannot be used as they are only allowed in top level classes. The only way is then to write real test methods and that's just a load of work when I usually need these things to just quickly see if something works as expected.