I think for the built-in screenshot UI this is solvable with one more layer of indirection (render the screenshot UI preview itself twice, once for screencasts, and once for the monitor). However, for third-party screenshot annotation tools, this will still be a problem.
Implemented this idea. It means rendering each monitor 3 times always for the screenshot but maybe it's fine? On this laptop 3 monitors × 3 renders takes 2 ms, and there's some unnecessary blocking I forgot to remove.
On the video, note how for me the screenshot UI has Secrets visible, but on the recording afterwards it's always blocked out.