When displaying PDF-Files using PDFViewer, ContentElementsCanvas .RenderAsync uses reflection (DispatcherObjectUtils.ApplyDispatcher) to render Visuals on multiple threads.
However this leads to a memory leak since the dispatchers cant be GC'ed, see screenshot below.
The Screenshot is from the actual application we expirienced this issue with, the attached reproduction example is a boiled down version of what your code does.
If you wanna reproduce this on your own, create an application that uses PdfViewer that switches between many pdf files. The ammount of Dispatchers will grow steadily, probably to a total of the number of threads used by Task.Factory.