Repository: flutter
Issue: EditableText's clipBehaviour only clips when overflowing horizontally
Labels: a: text input,framework,has reproducible steps,P2,team-text-input,triaged-text-input,found in release: 3.24

### Steps to reproduce

1. Create an `EditableText` with a `TextStyle` that has a reduced height (0.5). 
2. Enter any text into the EditableText. It is rendered without clipping.
3. Continue entering text until the EditableText becomes scrollable. Text starts clipping.

### Expected results

EditableText should clip it's content even if it is only overflowing vertically.

### Actual results

EditableText clips the content only when it overflows horizontally (becomes scrollable).

Reproducible on stable releases 3.19.3, 3.22.3, 3.24.0 and on latest master.

### Code sample

<details open><summary>Code sample</summary>

```dart
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const Scaffold(
        body: Center(
          child: Input(),
        ),
      ),
    );
  }
}

class Input extends StatefulWidget {
  const Input({super.key});

  @override
  State<Input> createState() => _InputState();
}

class _InputState extends State<Input> {
  final focusNode = FocusNode();

  final controller = TextEditingController();

  @override
  Widget build(BuildContext context) {
    return DecoratedBox(
      decoration: BoxDecoration(
        border: Border.all(
          color: Colors.black,
          width: 1,
        ),
      ),
      child: EditableText(
        clipBehavior: Clip.hardEdge,
        controller: controller,
        focusNode: focusNode,
        style: Theme.of(context).textTheme.displayLarge!.copyWith(
              height: 0.5,
            ),
        cursorColor: Colors.black,
        backgroundCursorColor: Colors.black,
      ),
    );
  }
}

```

</details>


### Screenshots or Video

<details open>
<summary>Screenshots / Video demonstration</summary>

| Text is not clipping | Text is clipping |
| --------------- | --------------- |
<img width="400" src="https://github.com/user-attachments/assets/b08ad5ec-2658-496e-b8bb-67b5951c8a69"> | <img width="400" src="https://github.com/user-attachments/assets/0fc7b2c8-0015-485c-8e17-451d20ba795b">


</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.24.0, on macOS 14.5 23F79 darwin-arm64, locale en-GB)
    • Flutter version 3.24.0 on channel stable at /Users/alex/workspace/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 80c2e84975 (12 days ago), 2024-07-30 23:06:49 +0700
    • Engine revision b8800d88be
    • Dart version 3.5.0
    • DevTools version 2.37.2

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Users/alex/Library/Android/sdk
    • Platform android-34, build-tools 30.0.3
    • ANDROID_HOME = /Users/alex/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15F31d
    • CocoaPods version 1.15.2

[✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[✓] Android Studio (version 2022.3)
    • 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 17.0.6+0-17.0.6b829.9-10027231)

[✓] VS Code (version 1.92.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.94.0

[✓] Connected device (3 available)
    • Alex’s iPhone (mobile)          • 00008130-001A310C0491401C • ios          • iOS 17.6.1 21G93
    • macOS (desktop)                 • macos                     • darwin-arm64 • macOS 14.5 23F79 darwin-arm64
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad     • darwin       • macOS 14.5 23F79 darwin-arm64

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.
```

</details>