Repository: flutter
Issue: MouseRegion behavior is inconsistent when upgrading from 3.16.9 to 3.22.1
Labels: c: regression,a: desktop,a: mouse,has reproducible steps,P3,team-framework,triaged-framework,found in release: 3.19,found in release: 3.22

### Steps to reproduce

The issue appeared after upgrading from Flutter 3.16.9 to 3.22.1

1. Use code from sample
2. Try resizing the black box by dragging its right side
3. See cursor cycling between resizeRight and basic

### Expected results

The cursor should remain SystemMouseCursors.resizeRight while dragging.

Or at least the Flutter engine should provide some alternative way to achieve old behavior.

### Actual results

Cursor cycles between resizeRight and basic

### Code sample

<details open><summary>Code sample</summary>

```dart
double width = 50;

    runApp(MaterialApp(
      home: Scaffold(
        body: StatefulBuilder(builder: (_, setState) {
          return Align(
            alignment: Alignment.topLeft,
            child: Stack(children: [
              Container(width: width, height: 50, color: Colors.black),
              Positioned(
                top: 0,
                bottom: 0,
                right: 0,
                child: Listener(
                  onPointerMove: (event) {
                    setState(() {
                      width += event.delta.dx;
                    });
                  },
                  child: const SizedBox(
                    width: 10,
                    child: MouseRegion(cursor: SystemMouseCursors.resizeRight),
                  ),
                ),
              ),
            ]),
          );
        }),
      ),
    ));
```

</details>


### Screenshots or Video

<details open>
<summary>Screenshots / Video demonstration</summary>

----

With Flutter 3.16.9:

https://github.com/flutter/flutter/assets/35242233/510ee74d-70ec-4032-9353-1f9a54adde83

----
With Flutter 3.22.1:

https://github.com/flutter/flutter/assets/35242233/075cb564-b9bb-423a-b77a-a0d23f6a9113



</details>


### Logs

_No response_

### Flutter Doctor output

<details open><summary>Doctor output</summary>

```console
[√] Flutter (Channel stable, 3.22.1, on Microsoft Windows [Version 10.0.22631.3593], locale pl-PL)
    • Flutter version 3.22.1 on channel stable at C:\tools\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision a14f74ff3a (4 hours ago), 2024-05-22 11:08:21 -0500
    • Engine revision 55eae6864b
    • Dart version 3.4.1
    • DevTools version 2.34.3

[√] Windows Version (Installed version of Windows is version 10 or higher)

[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at C:\Users\Gieted\AppData\Local\Android\sdk
    X cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    X Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.

[√] Chrome - develop for the web
    • CHROME_EXECUTABLE = C:\Program Files\Chromium\Application\chrome.exe

[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.9.6)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.9.34728.123
    • Windows 10 SDK version 10.0.22000.0

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions).

[√] IntelliJ IDEA Community Edition (version 2024.1)
    • IntelliJ at C:\Users\Gieted\AppData\Local\Programs\IntelliJ IDEA Community Edition
    • Flutter plugin version 79.1.3
    • Dart plugin version 241.17502

[√] IntelliJ IDEA Ultimate Edition (version 2023.1)
    • IntelliJ at C:\Users\Gieted\AppData\Local\Programs\IntelliJ IDEA Ultimate 2
    • Flutter plugin version 78.2.1
    • Dart plugin version 231.9414.10

[√] VS Code, 64-bit edition (version 1.89.1)
    • VS Code at C:\Program Files\Microsoft VS Code
    • Flutter extension can be installed from:
       https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.22631.3593]
    • Chrome (web)      • chrome  • web-javascript • unknown
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 125.0.2535.51

[√] Network resources
    • All expected network resources are available.

! Doctor found issues in 2 categories.
```

</details>