Repository: flutter
Issue: When the finger moves on the tablet, then switch to moving with the stylus, the listener widget loses some move events, ie, PointerMoveEvent will be lost in the middle
Labels: e: device-specific,platform-android,framework,f: gestures,P2,team-framework,triaged-framework

### 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.Open the tablet's developer options, then open the pointer position.(Easy observation of events)
2.Run your finger over the screen for some distance.
3.Switch to the stylus and swipe a distance.
4.Observe the trace of the drawn touch point.

### Expected results

The trace drawn by the stylus based on touch events does not suddenly lose part of it.

### Actual results

The touch event is lost, causing part of the handwriting to be lost as well.

### Code sample

<details><summary>Code sample</summary>

```dart
import 'package:flutter/material.dart';

class ScratchPainter extends CustomPainter {
  ScratchPainter(this.points);

  final List<Offset> points;

  @override
  void paint(Canvas canvas, Size size) {
    debugPrint(points.length.toString());
    var paint = Paint()
      ..color = Colors.black
      ..strokeCap = StrokeCap.round
      ..style = PaintingStyle.stroke;
    for (var i = 0; i < points.length - 1; i++) {
      canvas.drawCircle(points[i], 5, paint);
    }
  }

  @override
  bool shouldRepaint(ScratchPainter other) =>
      points.length != other.points.length;
}

class Scratch extends StatefulWidget {
  const Scratch({super.key});

  @override
  State createState() => _ScratchState();
}

class _ScratchState extends State<Scratch> {
  final List<Offset> points = [];

  @override
  Widget build(BuildContext context) {
    return Listener(
        child: CustomPaint(
          size: Size.infinite,
          painter: ScratchPainter(List.from(points)),
        ),
        onPointerDown: (details) {
          points.clear();
          setState(() {
            points.add(details.localPosition);
          });
        },
        onPointerMove: (details) {
          debugPrint(details.toString());
          setState(() {
            points.add(details.localPosition);
          });
        });
  }
}

void main() => runApp(const MyApp());

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<StatefulWidget> createState() => _MyApp();
}

class _MyApp extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Scratch(key: UniqueKey()),
      ),
    );
  }
}

```

</details>


### Screenshots or Video

<details>
<summary>Screenshots / Video demonstration</summary>


![Screenshot_20230804_165354_cn canote canote](https://github.com/flutter/flutter/assets/9957334/72456362-ca44-477f-b45d-b2746abbf162)
![Screenshot_20230804_165344_cn canote canote](https://github.com/flutter/flutter/assets/9957334/89a318a1-a63d-4f5a-89af-8c199bb03a2e)
![Screenshot_20230804_165310_cn canote canote](https://github.com/flutter/flutter/assets/9957334/0006b00b-e14c-4236-a293-f411e3fb208b)

</details>


### Logs

<details><summary>Logs</summary>

```console
[Paste your logs here]
```

</details>


### Flutter Doctor output

<details><summary>Doctor output</summary>

```console
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.10.2, on Microsoft Windows [版本 10.0.19044.3086], locale zh-CN)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.5.3)   
[√] Android Studio (version 2021.3)
[√] IntelliJ IDEA Ultimate Edition (version 2022.3)
[√] VS Code (version 1.76.2)
[√] Connected device (4 available)

```

</details>