title: The scrollView goes outside of its boundaries in .sheet
body: <p>I have a view in .sheet modal. The View goes outside of the .sheet boundaries in the vertical mode, but fine in the landscape mode.</p>
  <p>The view has only the scrollView, and within the scroll View, a bunch of custom UI Kit input fields.</p>
  <p>ScrollView:</p>
  <pre><code>    ScrollView(.vertical) {
      
              Text(&quot;Register&quot;)
              .font(.headline)
                  .bold()
                  .padding()
          
      
              SATextField(tag: 0, placeholder: &quot;Name&quot;, changeHandler: { (name) in
                  self.name = name
              }, onCommitHandler: {
                  print(&quot;commit handler&quot;)
              }, text: self.name)
                  .onTapGesture {
                      self.name = &quot;&quot;
                  }
              .padding()
              .keyboardType(.default)
              .overlay(
                  RoundedRectangle(cornerRadius: 16)
                      .stroke(self.name == &quot;&quot; ? borderColor : Color.green, lineWidth: 2)
              )                                    
             .fixedSize(horizontal: false, vertical: true)
  
  
  //more fields
          }
  </code></pre>
  <p>Custom Input field:</p>
  <pre><code>struct SATextField: UIViewRepresentable {
      private let tmpView = WrappableTextField()
      
      //var exposed to SwiftUI object init
      var tag:Int = 0
      var placeholder:String?
      var fieldVariable:String?
      var changeHandler:((String)-&gt;Void)?
      var returnKeyType: UIReturnKeyType = .default
      var isSecureTextEntry: Binding&lt;Bool&gt;? = nil
      var onCommitHandler:(()-&gt;Void)?
      var text: String?
      
      func makeUIView(context: UIViewRepresentableContext&lt;SATextField&gt;) -&gt; WrappableTextField {
          tmpView.tag = tag
          tmpView.delegate = tmpView
          tmpView.placeholder = placeholder
          tmpView.onCommitHandler = onCommitHandler
          tmpView.textFieldChangedHandler = changeHandler
          tmpView.isSecureTextEntry = isSecureTextEntry?.wrappedValue ?? false
          tmpView.returnKeyType = returnKeyType
          return tmpView
      }
      
      func updateUIView(_ uiView: WrappableTextField, context: UIViewRepresentableContext&lt;SATextField&gt;) {
          if text != nil {
              uiView.text = text
          }
          uiView.isSecureTextEntry = isSecureTextEntry?.wrappedValue ?? false
          uiView.setContentHuggingPriority(.defaultHigh, for: .vertical)
          uiView.setContentHuggingPriority(.fittingSizeLevel, for: .horizontal)
      }
  }
  </code></pre>
  <p>Adding .frame(width: ) or .frame(minWidth: , idealWidth: , maxWidth: ) doesn't help at all, or brings other bugs like shifting the view to the right.
  <a href="https://i.stack.imgur.com/PHaeU.png" rel="nofollow noreferrer">Example of ScrollView in SwiftUI</a></p>