I might be late but I will drop here my findings in case it’s useful for future readers.
From what I’ve seen, to get this to work you need to declare in your .h file:
static void ScreenshotCaptured(int32 Width, int32 Height, const TArray<FColor>& Bitmap);
in your .cpp you need:
UGameViewportClient::OnScreenshotCaptured().AddStatic(&ScreenshotCaptured);
With this, the delegate works and triggers when the screenshot has been generated. Don’t ask me why it requires these parameters to work, but it just does.
Got the info lurking around chinese websites and looking at how they implemented it:
https://blog.csdn.net/yb0022/article/details/76034181
https://blog.csdn.net/u014532636/article/details/80004616