My `$HOME` directory is filled with undo files

My $HOME directory is filled with files, with filenames in this format:

%path%to%file.md
%path%to%other%file%over%here.html
%home%agente11%project%.git%COMMIT_EDITMSG
%home%agente11%my_file.md

I have deleted all of them, and once I edit another file, another file is created in my home directory in the same format as the absolute path to the file I just edited (e.g. %home%agente11%undoTest.md)

When I cat the files, they are mostly garbage data, but with snippets of text (this file is /home/agente11/.gitconfig):

Vim�UnDo��Ԝr�ڻ^����
                   �q
                     Ϗ�$^!0U&���/B��e��_�����e���       editor = sensible-editor5��C⸮5��

Does anyone know why these files are being created, and how I can stop them?

(I have ruled out the possibility that it is this undotree plugin, so now I think that it could be a problem with Neovim itself (probably a misconfiguration on my part))

p.s. There is also a folder ~/.vim/undotree that has the same kinds of files (though, not the exact same files)