That is what I'm talking about: SwiftUI automatically uses the recommended conventions for spacing, padding, etc. which are different for macOS vs. iOS etc., and it also takes user environment settings into account, like font sizes and other accessibility options.
The whole situation is bizarre and comical if you look at it from a distance:
Everybody ALREADY puts tremendous effort in making sure things look and work the same everywhere: Browsers!
Not just Apple, Google, Microsoft and Mozilla, but the thousands of third-party maintainers (like yes Electron) in this newly-created circle of Hel that is the JavaScript ecosystem.
And now we're trying to turn the browsers into operating systems!!
Everyone keeps trying to reinvent a wheel that doesn't travel very far to begin with (see all the missing features from web apps that native apps get, being discussed on this page.)
The visual and interactive differences between a macOS app and a Windows app are actually less stark than the differences between a macOS app and a watchOS app (crown) or a tvOS app (remote), but so far, despite its early bugs and limitations, SwiftUI does a great job of outputting the native controls on all [of Apple's] platforms.
Things like NavigationViews and TabViews produce different beasts on macOS, iOS, iPadOS, and tvOS, from the same code.
See WWDC 2019: SwiftUI On All Devices: https://developer.apple.com/videos/play/wwdc2019/240/