Xcode forgetting which folders were open

Xcode is continuously reseting which folders have opened by some trigger (I think its building the project), so the same folders keep opening when I look, instead of how I last left it. Has anyone else eperienced this? What could a fix be?

What folders? Blue or yellow?

Xcode forgetting which folders were open
 
 
Q