Shell scripts in Xcode build phases running out of order

I am working on migrating an app to the new build system in Xcode 14. I am observing that sometimes build scripts don't run in order and I am getting random build failures. Are even scripts run in parallel or out of order in the new build system? I found an option that disables this FUSE_BUILD_SCRIPT_PHASES but it is already false by default.

Shell scripts in Xcode build phases running out of order
 
 
Q