dbt compile sometimes generate invalid manifest

We run dbt compile on CI and then upload manifest into s3.
We noticed that from time to time manifest file will be corrupt.
Example of the corrupt manifest looks a bit weird:

"created_at": 1733160940.8103287, "versions": null, "version": null}}}versions": null, "version": null}}}

So the impression if it was the old file that is a bit longer and the new file is written into it, overriding symbols but not shrinking the size of the file (it is just an impression, no real evidence of this so far).
Now I’m wondering about 2 things:

  1. would it be possible that writing manifest file when this file already exists may cause something like that?
  2. if I clean up the folder before each run on CI, would it cause any perf degradation (assuming that some of the files may be reused between runs for caching purposes)?
    Thanks