Repository: flutter
Issue: [TextField] Odd behavior with Microsoft IME Japanese Text input method
Labels: a: text input,c: regression,engine,a: internationalization,platform-windows,a: desktop,has reproducible steps,P2,found in release: 3.7,found in release: 3.11,team-windows,triaged-windows

### 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

When activating Japanese IME text input on Windows 10, with any input method different from Alphanumeric (e.g. Hiragana), the ```TextField``` widget behaves oddly.

After the first few characters typed into the ```TextField```, the system automatically underlines them, which is expected as it does the same on Notepad.

If I change the cursor position by clicking on another character, every character input duplicates what is preceded by it and prepends it to the current string.

The attached video gives a much better idea of I'm trying to say.



### Expected results

I expected to just insert the new characters without duplication.

### Actual results

It duplicated the inserted string.

### Code sample

<details><summary>Code sample</summary>

```dart
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'IME Bug Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(title: 'IME Bug Demo'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  final TextEditingController textEditingController = TextEditingController();

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            const Text(
              'Example IME test',
            ),
            Container(
              height: MediaQuery.of(context).size.height * 0.5,
              child: TextField(
                controller: textEditingController,
                maxLines: null,
              ),
            ),
          ],
        ),
      ),
    );
  }
}

```

</details>


### Screenshots or Video

<details>
<summary>Screenshots / Video demonstration</summary>

https://user-images.githubusercontent.com/7721006/236826283-6a55f9b4-d8cd-4ff6-9664-be53cf5d1573.mp4

</details>





### Logs

<details><summary>Logs</summary>

```console
[+5414964 ms] Skipping target: gen_localizations
[        ] Skipping target: gen_dart_plugin_registrant
[        ] Skipping target: _composite
[        ] complete
[  +45 ms] Scanned through 586 files in 45ms
[   +1 ms] <- reset
[        ] Compiling dart to kernel with 0 updated files
[        ] Processing bundle.
[        ] <- recompile package:ime_test/main.dart b08beb44-b1ab-44c5-8d9e-6523028f142a
main.dart:1
[        ] <- b08beb44-b1ab-44c5-8d9e-6523028f142a
[        ] Bundle processing done.
[ +279 ms] Updating files.
[  +29 ms] DevFS: Sync finished
[        ] Synced 32.1MB.
[        ] <- accept
[ +160 ms] Hot restart performed in 518ms.
[   +1 ms] Restarted application in 523ms.
```

</details>


### Flutter Doctor output

<details><summary>Doctor output</summary>

```console
[√] Flutter (Channel stable, 3.7.12, on Microsoft Windows [Versione 10.0.19044.2846], locale en-US)
    • Flutter version 3.7.12 on channel stable at D:\development\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 4d9e56e694 (3 weeks ago), 2023-04-17 21:47:46 -0400
    • Engine revision 1a65d409c7
    • Dart version 2.19.6
    • DevTools version 2.20.1

[X] Windows Version (Unable to confirm if installed Windows version is 10 or greater)

[√] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
    • Android SDK at C:\Program Files (x86)\Android\android-sdk
    • Platform android-33, build-tools 32.0.0
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.11+9-b60-7590822)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.4.1)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.4.33110.190
    • Windows 10 SDK version 10.0.22621.0

[√] Android Studio (version 2021.1)
    • Android Studio at C:\Program Files\Android\Android Studio
    • 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.11+9-b60-7590822)

[√] VS Code, 64-bit edition (version 1.78.0)
    • VS Code at C:\Program Files\Microsoft VS Code
    • Flutter extension version 3.63.20230303

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Versione 10.0.19044.2846]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 112.0.5615.138
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 113.0.1774.35

[√] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 1 category.
```

</details>