uxterm issues after upgrades

My uxterm instances work well at first, but after some time, pressing underscore gets yields ;2;126~ and tilde yields ;2;95~. This happened after upgrade two machines to 12.2-RELEASE within the past two weeks. I also upgraded all the packages as well, so that adds some complication. One machine uses a MATE environment, and the other uses an IceWM. If I use the reset utility, uxterm starts working again, but after some time, it's starts echoing garbage.

With the IceWM machine, I have uxterms ssh'd into Linux machines and those don't have these problems.
This appears to be triggered by gvim or vim -g. These commands will output escape sequences. I don't know what they do, but I'm curious as to what may have changed for this problem to appear.