If you run the attached testcase with layer borders turned on, you'll see that the animating red box stalls for a couple of seconds part-way through.
The issue is that we're calling -disableScreenUpdatesUntilFlush on the NSWindow when there is actually no view drawing to be done, so that the window flush never happens. This means that screen updates end up being disabled until the watchdog enables them again (after 2 seconds).
Created attachment 40820 [details]
Created attachment 54830 [details]
I think this testcase reproduces the problem