SwiftUI: The content and cursor are intermittently outside the bounds of the TextEditor

In SwiftUI, the content and cursor are intermittently outside the bounds of the TextEditor.

struct ContentView: View {
    @State private var text = ""
    var body: some View {
        VStack {
            TextEditor(text: $text)
                .frame(maxWidth: .infinity, maxHeight: .infinity)
                .border(Color.gray, width: 1)
        }
        .padding()
    }
}

I enter multiline text into TextEditor.

The content and cursor are intermittently outside the bounds of the TextEditor at the bottom.

Screen recording:

The problem also appears on my iPad.

I guess it may be related to the input method.

Is it possible to solve this problem?

SwiftUI: The content and cursor are intermittently outside the bounds of the TextEditor
 
 
Q