There should be an option to use flatten on project AND the locked automation tracks getting adjusted. It wouldn’t make sense to unlock every automation track to flatten the tracks accuratly - but it’s currently the only option.
Since I use locked automation tracks for permance gain and the sake of preventing to screw up my automation tracks this feature should be available.