I have the same issue in UE4 where I figured out that aftermath may be not compatible with
- -D3DDebug launch command param.
- Renderdoc Plugin (if initialized).
- D3DDebugLayer if without Graphics Tools on your device.
Not really sure if the issue is the same in 5.1. Hope this would help someone.