Repository: flutter
Issue: [a11y] Incorrect TalkBack/VoiceOver focus after closing popup dialog
Labels: platform-android,platform-ios,framework,a: accessibility,has reproducible steps,P2,found in release: 3.3,found in release: 3.5,team-framework,triaged-framework


## Steps to  Reproduce

<!-- Please include full steps to reproduce so that we can reproduce the problem. -->

1. Execute `flutter run` on the code sample <!-- (see "Code sample" section below) -->
2. Enable TalkBack function
3. Navigate to 'Button 4' with right swipes
4. Double-click on Button 4 to open popup
5. Navigate to 'OK' button with right swipes and double click

**Expected results:** <!-- what did you want to see? -->
Focus (green TalkBack frame) is set back to Button 4
**Actual results:** <!-- what did you see? -->
Focus (green TalkBack frame) is randomly set to any element (most ofter to Button 2)


https://user-images.githubusercontent.com/7279920/198710648-74c8834b-63bc-4059-8723-14d31784b78c.mov

<details>
<summary>Code sample</summary>

```dart
import 'package:flutter/material.dart';
import 'dart:developer';

void main() {
  // debugFocusChanges = true;
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {

    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const 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 Column(
      children: [
        TextButton(
          child: Text("Button 1"),
          onPressed: (){},
        ),
        TextButton(
          child: Text("Button 2"),
          onPressed: () {},
        ),
        TextButton(
          child: Text("Button 3"),
          onPressed: (){},
        ),
        TextButton(
          child: Text("Button 4"),
          onPressed: () async {
            await showDialog<void>(
              context: context,
              builder: (BuildContext context) {
                return AlertDialog(
                  title: const Text('AlertDialog Title'),
                  actions: <Widget>[
                    TextButton(
                      child: const Text('OK'),
                      onPressed: () async {
                        Navigator.pop(context);
                      },
                    ),
                  ],
                );
              },
            );
          },
        ),
      ],
    );
  }
}


```
</details>
<details>
  <summary>flutter doctor -v</summary>
<!-- Finally, paste the output of running `flutter doctor -v` here. -->

```dart
[✓] Flutter (Channel stable, 3.3.6, on macOS 13.0 22A380 darwin-arm, locale en-US)
    • Flutter version 3.3.6 on channel stable at /Users/.../dev/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 6928314d50 (3 days ago), 2022-10-25 16:34:41 -0400
    • Engine revision 3ad69d7be3
    • Dart version 2.18.2
    • DevTools version 2.15.0

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at /Users/{user}/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.0.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14A400
    • 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)

[✓] HTTP Host Availability
    • All required HTTP hosts are available
```
</details>