Folder permission of `~/.local/state` was set to `drwx------@` instead of `drwxr-xr-x@`

In short, I just want to know whether or not the behavior as the title is related to NeoVim and whether it’s normal. (Sorry that this problem might be not related to NeoVim, but I really need some experts to help me double-check it.)

I’m a NeoVim nightly user and I recently encountered some segment faults when testing with a legacy plugin(can provide more details if needed). So I rebuilt NeoVim frequently to test which version of NeoVim was compatible with that plugin without any segment fault. Then, suddenly, I noticed that the owner of the runtime folder ~/.local/state(I removed this folder each time before I built NeoVim, so I believe this was created after NeoVim had started) was set to root, which caused many plugins to fail due to their need to access some files inside it. After hours of debugging, I found a temporary workaround by removing a sudo from a line of my NeoVim build script. Now, the owner of ~/.local/state is set to my username again, but I suspect the file permission pattern is not the default, as I indicated in the title.

The umask under ~/.local always prints 022. From current my understanding, the folder created at ~/.local should always have the file permission regarding the umask value, so any folder created there should have the same file permission as that of the one I create with mkdir foo. (i.e. it should be 755 instead of 700)

Really need some helps.

(p.s. you can ignore that @ sign since I just learned that it is something specific to macOS Ventura and it’s probably not related to my question.)