It appears that long file names (longer than MAX_PATH which is 260 characters) passed to atomic.WriteFile are not automatically prefixed with \\?\ which makes them fail.
I have a workaround in my package:
https://github.com/kopia/kopia/blob/59b0464931158fb0fdd436717788ee646327dd65/internal/atomicfile/atomicfile.go
Would it make sense to make similar change here?