I had this issue too, and found that contentMarginsDisabled() also doesn't work in the preview (even with the newer syntax) if:
Your widgets are exposed in a WidgetBundle and the one you're previewing isn't in the bundle
Your widget definition's kind property isn't unique
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: