There is a response here "from an Apple engineer" that works for me:
.onPreferenceChange(HeightKey.self) { [$height] newValue in
$height.wrappedValue = newValue
}
Post
Replies
Boosts
Views
Activity
I'm getting the same errors on all builds' tests. Haven't figured out any way around it.