This is fixed in iOS 18.4. I have implemented this workaround for version 18.0 to 18.3:
if #available(iOS 18.4, *) {
} else if #available(iOS 18, *),
UIDevice.current.userInterfaceIdiom == .pad,
horizontalSizeClass == .regular {
Rectangle()
.fill(.regularMaterial)
.frame(height: 50)
}