Repository: flutter
Issue: Flutter text field (on android) shows plain text character when max char limit reached and user attempts to insert in the middle of the string. 
Labels: a: text input,platform-android,framework,engine,has reproducible steps,P2,team-android,triaged-android,found in release: 3.16,found in release: 3.18

### Steps to reproduce

1. Use android  device
2.Add a TextField 
3.Switch to the password entry box
4.Enter the maximum length and then switch to another place
5.Found plaintext displayed

Original title: Android TextField reaches the maximum password value, switching to any position and entering a new character again should not take effect, but the location cursor and text is clearly displayed in the password box

### Expected results

The maximum length cannot be entered, and the plaintext cannot be displayed

### Actual results

4.Enter the maximum length and then switch to another place
5.Found plaintext displayed

### Code sample

<details open><summary>Code sample</summary>

```dart
TextField(
        //文字默认小写
        textCapitalization: TextCapitalization.none,
        style: TextStyle(
          color: FColor.text33,
          fontSize: widget.fontSize ?? 18.fsp,
        ),
        //是否能够复制粘贴
        enableInteractiveSelection: true,
        focusNode: widget.focusNode,
        maxLength: 20,
        autofocus: false,
        controller: widget.controller,
        inputFormatters: [
          FilteringTextInputFormatter.deny(
              RegExp(r'[\u4e00-\u9fa5.·\u36c3\u4DAE]'))
        ],
        obscureText: hidePw,
        textInputAction: TextInputAction.done,
        keyboardType: TextInputType.visiblePassword,
        decoration: InputDecoration(
          icon: widget.needIcon
              ? SvgPicture.asset(
                  ImageAssets.accountIcLockSvg,
                )
              : null,
          focusedBorder: InputBorder.none,
          enabledBorder: InputBorder.none,
          isCollapsed: true,
          hintText: widget.hintText,
          hintStyle: TextStyle(
              color: FColor.textCC,
              fontSize: widget.fontSize ?? 18.fsp,
              fontWeight: FontWeightPlus.w400),
          counterText: '',
          suffixIconConstraints: const BoxConstraints(
            maxHeight: 24,
            maxWidth: 15 + 11 + 24,
          ),
          suffixIcon: Container(
            margin: const EdgeInsets.only(right: 15, left: 11),
            child: GestureDetector(
                onTap: () {
                  setState(() {
                    hidePw = !hidePw;
                  });
                },
                child: Icon(
                  hidePw ? IconAssets.closeEye : Icons.remove_red_eye,
                  color: FColor.hintText,
                )),
          ),
        ),
      )

```

</details>


### Screenshots or Video

<details open>
<summary>Screenshots / Video demonstration</summary>

https://github.com/flutter/flutter/assets/12081932/93a7a3b9-c27d-4eb3-83a8-bb715d7d93a9




</details>


### Logs

<details open><summary>Logs</summary>

```console
[Paste your logs here]
```

</details>


### Flutter Doctor output

<details open><summary>Doctor output</summary>

```console
[✓] Flutter (Channel stable, 3.16.5, on macOS 14.1.1 23B81 darwin-arm64, locale
    zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.0.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.2)
[✓] VS Code (version 1.85.1)
[✓] Connected device (5 available)
[✓] Network resources
```

</details>