Character flags and databases are unrelated. I don't know to what extent character flags are (not) saved by GM mode though. I will ask around tomorrow.
You can use invisible statuses to control scripts (you could check on the status in the OnInit() event of a behaviour script, or in the SavegameLoaded() event in Osiris.