You could try debugging by running locally: GitHub - netlify/build-image: This is the build image used for running automated builds , and file a bug if you can understand more or create a reproduction case: Issues · netlify/build-image · GitHub
Not sure that it’s a bug, may be intended behavior, but that’s the best place to file those kinds of requests, particularly if you can easily reproduce