X-Plane will save key assignments and settings if you are not discarding preferences. Go to settings > Operations & Warnings & double check that "discard changes to preferences" is NOT checked.
If you want to save your flight, try using File > save situation. Using Load Situation will let you start at the same spot when you saved.