Ok, I have some more information about this. It happened again last night, but it didn't require changing the font setting. I switched back and forth between my main.py file and the documentation tab. When I return back to the .py file it updated the editor text with code that was about 5 min old.
I immediately cut all my internet (airplane mode within 1 second) so no further iCloud syncing could happen. My internet was on 3G so syncing was slow-ish.
I then download Pythonista to another iOS device and allowed iCloud to sync the files it had. Wouldn't you know!? The iCloud version was the 5 minute old file!
I am wondering if the Pythonista editor refreshes the current editor text with the iCloud version .py file even if it is older or not fully synced. I am not sure if my assumption is truly correct, but I wanted to share this issue. Maybe it is something I am doing wrong.... I believe this issue is isolated to the iCloud folder. I never seen this until I moved my project to from the phone folder to the iCloud folder.
For now, I just added the following code to my project so it archives everytime I run.
# Back up script to text file before running
st = editor.get_text() # script text
dt = str(datetime.datetime.now())
f = open('Backup '+ dt, "w+")
# my script below...