Repository: flutter
Issue: [iPad] GestureDetector gets stuck in a "pressed" state if pressed when the keyboard is hiding
Labels: a: text input,platform-ios,framework,a: tablet,f: gestures,has reproducible steps,P2,found in release: 3.7,found in release: 3.9,team-ios,triaged-ios

## Steps to Reproduce


1. Run sample on **iPad** (landscape mode, but portrait should be broken too)  (see "Code sample" section below) 
2. Click TextField (Red area) and make sure the keyboard appeared 
3. Press the button ("Do Nothing\nButton") and hold a second till the keyboard is gone
4. Release the button
Or even try just clicking over the button without the "long press."

**Expected results:** <!-- what did you want to see? -->
Should work consistently with iOS/Android/Web (at least)
The button becomes unpressed; dialog should be shown (click handler)

**Actual results:** 
The button remains "pressed", and no dialog is shown (click handler)

<details>
<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 const MaterialApp(
      home: MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key});
  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(),
      body: SafeArea(
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.stretch,
          children: [
            Expanded(
              child: SingleChildScrollView(
                child: Column(
                  children: [
                    ColoredBox(
                      color: Colors.red,
                      child: TextField(
                        minLines: 100,
                        maxLines: 100,
                        onTapOutside: (_) => FocusScope.of(context).unfocus(),
                      ),
                    ),
                  ],
                ),
              ),
            ),
            OutlinedButton(
              onPressed: () => showDialog(
                  context: context,
                  builder: (context) => AlertDialog(
                        title: const Text('Alert Dialog'),
                        content: const Text('This is an alert dialog.'),
                        actions: [
                          TextButton(
                            onPressed: () => Navigator.of(context).pop(),
                            child: const Text('OK'),
                          ),
                        ],
                      )),
              child: const Text('Do Nothing\nButton'),
            ),
          ],
        ),
      ),
    );
  }
}

```

</details>

<details>
  <summary>Logs</summary>

```
[✓] Flutter (Channel stable, 3.7.7, on macOS 13.0 22A380 darwin-x64, locale en)
    • Flutter version 3.7.7 on channel stable at /Users/andrei/Desktop/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 2ad6cd72c0 (5 days ago), 2023-03-08 09:41:59 -0800
    • Engine revision 1837b5be5f
    • Dart version 2.19.4
    • DevTools version 2.20.1

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at /Users/andrei/Library/Android/sdk
    • Platform android-33, build-tools 33.0.0
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14C18
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.2)
    • 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
      11.0.12+0-b1504.28-7817840)

[✓] VS Code (version 1.76.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.60.0

[✓] Connected device (3 available)
    • iPad (10th generation) (mobile) • C5E95963-35D5-4306-A28D-D37780516E1F •
      ios            • com.apple.CoreSimulator.SimRuntime.iOS-16-2 (simulator)
    • macOS (desktop)                 • macos                                •
      darwin-x64     • macOS 13.0 22A380 darwin-x64
    • Chrome (web)                    • chrome                               •
      web-javascript • Google Chrome 111.0.5563.64

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!
```

</details>

![Mar-14-2023 03-27-44](https://user-images.githubusercontent.com/10124814/224877200-34b0bf10-2cf6-4ae9-9f0a-cb769302ec60.gif)