So we fixed it by deleting manually the ApplocalPrerequisitesDirectory in DefaultEngine.ini (Of the current project, not the engine). Just delete whatever the engine is writing on its own, it should look like this:
ApplocalPrerequisitesDirectory=(Path=)
After that we built and deployed it with no issues,