Here is the problematic code,
g = Binarize@
ImageResize[Rasterize[Plot[Sin[1 x], {x, 0, \[Pi]}]], {100, 100}];
Image`ImportExportDump`ImageWritePNG["D:\\g.png", g];
Image`ImportExportDump`ImageReadPNG["D:\\g.png"]
Now, I think an animated gif would demonstrate the weird buggy behaviour better.
Is it intended behaviour of undocumented ImportExportDump? Why do we need to Import twice to release the somewhat cache issue? What is the workaround if we want fast import and export PNG multiple times to same file path?

Image`ImportExportDump`DeleteCachePNG[]is not available in v13 anymore ... Hmm ... – Domen Jan 11 '24 at 12:28ImportExportDumpDeleteCachePNG[] works on 13.2. But I am wondering why you can't reproduce it. – matheorem Jan 11 '24 at 12:34DeleteCachePNGis removed right after version 13.2. They probably integrateDeleteCachePNG[]intoImageReadPNGnow. – matheorem Jan 11 '24 at 13:22