Seriously -- if you memorize lines in your apartment and you've got them down pat, then you show up to your class/theater/set/audition and suddenly you have difficulty remembering them.
Because -- and this is common knowledge in acting -- your brain has subconsciously associated the lines with your apartment.
Which is why, once you've memorized the lines at home, you then take a walk and practice and re-memorize them again. Then while you're on the subway you practice and fix them again. And when you show up early to your class/theater/set/audition you spend 10 minutes practicing them again, to associate them with the space where you're performing.
You just have to. It's how memorization works. For whatever reason, it's associated with your mental location.
Same reason that when plays are on tour, they try to have a full rehearsal run-through in each new theater before a performance. You need to associate your memory with the new theater and fix your mistakes during rehearsal, not during performance.