One day one PR was compiling and two days after (25th August) it stopped working along with the other previews. No configuration changes. The main branch (no preview) compiles and deploys perfectly.
The only error came from the backend log several times:
2023-08-25T09:39:50.524Z [WARNING]: - Initializing your environment: dev
2023-08-25T09:39:51.313Z [WARNING]: - Building resource api/proppexV1
2023-08-25T09:39:51.354Z [WARNING]: - Building resource auth/proppexAuth
2023-08-25T09:39:51.527Z [WARNING]: - Building resource auth/userPoolGroups
2023-08-25T09:39:51.732Z [WARNING]: - Building resource storage/proppexPublicBucket
2023-08-25T09:39:51.765Z [WARNING]: ✔ Initialized provider successfully.
2023-08-25T09:40:13.991Z [WARNING]: ✖ There was an error initializing your environment.
2023-08-25T09:40:13.995Z [INFO]: 🛑 Executing custom build scripts is not yet implemented
2023-08-25T09:40:13.995Z [INFO]: Learn more at: https://docs.amplify.aws/cli/project/troubleshooting/
Attached a picture showing that the same commit first worked and then didn't.