This is a multi-year issue which I do not think existed at some point in the past, but I don't know when it started happening. From time to time I've tried to poke at it and figure out why it happens, but I never found a solution.
I have a philosophy about my development environment that I think is a little out of the ordinary: I don't like to bling it up too much. The basic idea is that I use things that are available in "normal" distributions. In some sense I don't want to become accustomed to anything that I won't be able to use wherever I might end up needing to work. (Backstory is that a colleague refused to work at a workstation once because he couldn't get all his editor bling working on it, and I realized I never want to become hooked to bling like that). This is all just to say that my setup is pretty spartan (I don't use rust-analyzer, for instance), but that does not mean it's 100% pure of custom modifications -- but the general answer to "are you running plugin X" is "no", unless it's part of the most common gvim distros. I use the same configuration on all platforms (vim configuration is checked in and distributed using scm), and I try to avoid platform-specific configurations. (Again, might not be 100% free of it, but I do my best to avoid adding any custom platform-specific configuration changes).
I do, however, use run rustfmt-on-save, because that's part of all the gvim distributions I use -- and it's what has been causing me some grief [on Windows].
The problem I'm having is that when I save a file [on Windows], and rustfmt succeeds, then gvim moves the cursor to the second-to-last line. Given how gvim works, I can in most cases just press Ctrl-O to get back to where I was, but it's still kind of annoying. (I've been able to live with this, because I usually do development on other platforms and just patch Windows-specific issues on Windows, but I'm currently working on something that requires more actual Windows screen time).
Has anyone seen this before? Anyone know how to solve this? Perhaps more importantly, how would one even begin to diagnose this? I'm ashamed to admit that whenever I've tried to solve this, it has basically been using the shotgun approach, because I don't know how I would go about investigating this systematically.
I have found a few others mention this behavior, and IIRC some had gvim place the cursor on a different line (not the second to last), but in other regards it appears to be the same issue -- but I haven't found any actual explanation/solution.