Ren'Py games saves a "persistent" file, which tracks records of any single game done in that engine, so if the internal system of the game stays the same (no major re-done of the game coding and logical setup), all your past saves are efectively available to use in the next iteration / update, that's why you still have the gallery unlocked
In other matters, been poking around in the game files, and all indicates that the codes that i found are the right ones:
Cheat = g3j4i8
Gallery = d1n3o5
**EDIT**
Found the right codes