Repository: flutter
Issue: go_router browser back button to dismiss dialog
Labels: package,has reproducible steps,P3,p: go_router,found in release: 3.3,found in release: 3.4,team-go_router,triaged-go_router

See following code:

```dart
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  MyApp({super.key});

  late final GoRouter _router = GoRouter(
    routes: [
      GoRoute(
        path: '/',
        builder: (context, state) => MyPage(),
      ),
    ],
  );

  @override
  Widget build(BuildContext context) {
    return MaterialApp.router(
      routerConfig: _router,
    );
  }
}

class MyPage extends StatelessWidget {
  const MyPage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Center(
      child: TextButton(
        onPressed: () {
          showDialog(
            context: context,
            builder: (_) {
              return Center(child: Container(width: 300, height: 200, color: Colors.green));
            },
          );
        },
        child: Text('open'),
      ),
    );
  }
}
```

Steps to reproduce:

1. Open app link in new browser tab
2. Press "open" button => dialog is shown
3. Press browser "Back" button => application is navigated back to "New Tab".
Expected behavior: dialog should be closed, application should remain opened. 

I made simple example without using go_router and all works as expected.

go_router version: 5.0.1

```
[✓] Flutter (Channel stable, 3.3.2, on Ubuntu 22.04.1 LTS 5.15.0-48-generic, locale en_US.UTF-8)
    • Flutter version 3.3.2 on channel stable at /home/kernel/work/common/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision e3c29ec00c (3 weeks ago), 2022-09-14 08:46:55 -0500
    • Engine revision a4ff2c53d8
    • Dart version 2.18.1
    • DevTools version 2.15.0

[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.


[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop
    • Ubuntu clang version 14.0.0-1ubuntu1
    • cmake version 3.22.1
    • ninja version 1.10.1
    • pkg-config version 0.29.2

[!] 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/linux#android-setup for detailed instructions).

[✓] IntelliJ IDEA Ultimate Edition (version 2022.2)
    • IntelliJ at /home/kernel/work/common/idea
    • Flutter plugin version 70.0.5
    • Dart plugin version 222.3739.24

[✓] Connected device (2 available)
    • Linux (desktop) • linux  • linux-x64      • Ubuntu 22.04.1 LTS 5.15.0-48-generic
    • Chrome (web)    • chrome • web-javascript • Google Chrome 106.0.5249.61

[✓] HTTP Host Availability
    • All required HTTP hosts are available

```