I got the same problem.
My situation is the code works fine on Mac and iPhone, no setting to nil on the background, but the problem occurs occasionally on the iPad (not every time, 1/3 I guess).
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: