Repository: flutter
Issue: Unable to widgetTester.enterText 2 times or more in the same text fields in flutter integration test
Labels: a: tests,framework,f: integration_test,has reproducible steps,P2,team-framework,triaged-framework,found in release: 3.13,found in release: 3.14

### Related issues
[120060](https://github.com/flutter/flutter/issues/120060)

### Is there an existing issue for this?

- [X] I have searched the [existing issues](https://github.com/flutter/flutter/issues)
- [X] I have read the [guide to filing a bug](https://flutter.dev/docs/resources/bug-reports)

### Steps to reproduce

1. I entered invalid email text into the text field with the text 'Email'
2. I clicked 'Sign in'
3. I checked the error text.
4. I re-entered a valid email to this field.

### Expected results

The email text field value should be the new valid email.

### Actual results

The email text field value still kept the old invalid email.

### Code sample

<details><summary>Code sample</summary>

```dart
await tester.enterText(
          find.widgetWithText(TextField, 'Email'),
          'invalid@gmail..com',
        );
await tester.pumpAndSettle();

await tester.tap(find.widgetWithText(
            ElevatedButton, 'Sign in'));
await tester.pumpAndSettle();
expect(find.text('Invalid email'), findsOneWidget);

await tester.enterText(
          find.widgetWithText(TextField, 'Email'),
          'valid@gmail.com',
        );
await tester.pumpAndSettle();
```

</details>


### Screenshots or Video

<details>
<summary>Screenshots / Video demonstration</summary>

[Upload media here]

</details>


### Logs

<details><summary>Logs</summary>

```console
[Paste your logs here]
```

</details>


### Flutter Doctor output

<details><summary>Doctor output</summary>

```console
[✓] Flutter (Channel stable, 3.13.2, on macOS 13.5.1 22G90 darwin-arm64, locale
    en-VN)
    • Flutter version 3.13.2 on channel stable at /Users/phat/Developer/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ff5b5b5fa6 (3 weeks ago), 2023-08-24 08:12:28 -0500
    • Engine revision b20183e040
    • Dart version 3.1.0
    • DevTools version 2.25.0

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/phat/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /Applications/Android
      Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      11.0.15+0-b2043.56-8887301)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14E222b
    • CocoaPods version 1.12.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build
      11.0.15+0-b2043.56-8887301)

[✓] IntelliJ IDEA Ultimate Edition (version 2023.1.4)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] Connected device (3 available)
    • iPhone 14 Pro Max (mobile) • F8FD829A-C7E2-480D-BB26-BE7B40808AE0 • ios
      • com.apple.CoreSimulator.SimRuntime.iOS-16-4 (simulator)
    • macOS (desktop)            • macos                                •
      darwin-arm64   • macOS 13.5.1 22G90 darwin-arm64
    • Chrome (web)               • chrome                               •
      web-javascript • Google Chrome 116.0.5845.187

[✓] Network resources
    • All expected network resources are available.

• No issues found!
```

</details>