Release: 2.0.9.108 (Canary) 2024-10-03

Thanks. That seems (to me) pretty conclusive that it’s not just Windows File Caching.

The only other tool I can think of short of a debugger is Sysinternals Process Monitor.
I’m not counting on it, since it “looks” like there’s no I/O, and it won’t show CPU detail.

I’m hoping you already ran About → Show log → Live → Profiling to look for its clues.
Problem with that is that the focus is on the SQL, and newly found slowdown was not:

Blog post: Speeding up inner workings of DoCompact() by up to 1000x

Maybe someone more familiar with compact could tell if your slowdown is in that spot.