Oops! Had it set to 30 fps without realizing. And when I set it to 60 fps, it lagged horribly, much like OBS Studio.
This inspired me to try 30 fps in Studio, but it still doesn't work. It doesn't lag quite as much as before, but the output is still missing lots and lots of frames. (High vs. indistinguishable quality doesn't matter here.)
I wonder if it's time for a new computer, or for an SSD for this one. I don't know if writing to disc is the bottleneck here, but if so, an SSD would certainly fix it.