in some error cases the handler is not called, see the comments on:
why-setunhandledexceptionfilter-cannot-capture-some-exception-but-addvectoredexc
I would simple set the registry keys (f.e. in your setup) to let WER write the dump files for you, and remove the unhandled exception filter:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\YourProcessName.exe]
"DumpType"=dword:00000001
you can control the writing of the dump file as explained in:
collecting-user-mode-dumps