Repository: flutter
Issue: [go_router]  since v13 🐛 showBottomModalSheet not working in nested navigation with StatefulShell 
Labels: package,has reproducible steps,P2,p: go_router,team-go_router,triaged-go_router,found in release: 3.22

StatefulShellBranch -> page1 -> page2 

When calling context.pop() in nested page2, it goes back to page1 instead of closing the modal
It was working fine before 13.0.0, broken after

### Steps to reproduce

1. call showBottomModalSheet() in a nested StatefulShell navigation 
2. call context.pop() 

### Expected results

Context.pop should dismiss the modal

### Actual results

Context.pop go back to previous page (parent) and doesn't dismiss modal

### Code sample

<details open><summary>Code sample</summary>

You can find a simple example demonstrating the bug here :
https://github.com/tempo-riz/bug-report/blob/main/gorouter_nested_nav_showbottommobal/lib/main.dart

</details>


### Video

<details open>
<summary>Video of the bug</summary>

https://github.com/flutter/flutter/assets/64015162/5fbdc332-b10f-4922-a6f4-5267c1505991

</details>


### Workaround
If using  `useRootNavigator: true` then `Navigator.of(context, rootNavigator: true).pop();` seems to work as expected



### Flutter Doctor output

<details open><summary>Doctor output</summary>

```console
[√] Flutter (Channel stable, 3.19.6, on Microsoft Windows [Version 10.0.22631.3447], locale en-CH)
    • Flutter version 3.19.6 on channel stable at C:\apps\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 54e66469a9 (4 weeks ago), 2024-04-17 13:08:03 -0700
    • Engine revision c4cd48e186
    • Dart version 3.3.4
    • DevTools version 2.31.1

[√] 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\chati\AppData\Local\Android\sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: C:\Program Files\Android\AndroidStudio\jbr\bin\java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-10027231)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop Windows apps (Visual Studio Build Tools 2019 16.11.30)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools
    • Visual Studio Build Tools 2019 version 16.11.34031.81
    • Windows 10 SDK version 10.0.19041.0

[√] Android Studio (version 2022.3)
    • Android Studio at C:\Program Files\Android\AndroidStudio
    • 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 17.0.6+0-b2043.56-10027231)

[√] VS Code (version 1.89.1)
    • VS Code at C:\Users\chati\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.88.0

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.22631.3447]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 124.0.6367.158
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 124.0.2478.51

[√] Network resources
    • All expected network resources are available.

• No issues found!
```

</details>