WidgetKit: Insufficient Permission to submit GPU work from background

I have a iOS 14 widget with a spriteKit in it to draw a graph. The spriteKit is turned into an image which is shown on the widget.

This works fine, but when the widget tries to re-render the graph in the background (ie. phone is turned off), I get the error

Code Block text
Execution of the command buffer was aborted due to an error during execution. Insufficient Permission (to submit GPU work from background) (IOAF code 6)

I assume that there must be a way to render spriteKits in the background, since many native widgets do it (screen time widget, stock widget, etc).

Any ideas on how to render spriteKits in the background? Or a workaround to this error.
It just occurred to me that the graphs in the apple widgets (screentime & stock) could be built with swiftUI, not spriteKit.

Is that the recommended way to draw graphs in widgets? Does anyone know if those apple widgets use swiftUI or spriteKit?

Thanks
WidgetKit: Insufficient Permission to submit GPU work from background
 
 
Q