I have the same issue, and it is one of the most irritating daily work bugs. I'm using Windows 11 Enterprise edition, so whatever it is causing this it's fundamental to some internals of Windows.
It goes like this. Select a file name, or a folder name, then use either F2 or a delayed mouse click to select the filename editing feature. What I've discovered is that Windows will automatically select the entire filename, and no matter what I do with the keyboard cursor keys (HOME, END, INS, DEL, up arrow, down arrow, left arrow, right arrow) after a short delay Windows will re-select the entire filename.
This is quite surprising, and extraordinarily annoying. I curse it every day.
I agree with other posts here. This extraordinarily annoying bug seems to be strongly correlated with cloud files. In my case, the files are on OneDrive. Doing the same actions on a file stored locally doesn't reveal the bug.
Followup. Disabling File Sync using the OneDrive settings seems to cure the behavior. There is about a one minute delay between the disable and the inhibiting of the bug.