When build process is set to run in background I observed many issues from Errors in the generation to app crashes but I also saw complete runs work when put into background.
Looks like a complex bug maybe caused by inconsistencies in Androids background process handling.