Repository: flutter
Issue: [go-router] child page transition animation doesn't play when placed inside ShellRoute
Labels: package,has reproducible steps,P2,p: go_router,team-go_router,triaged-go_router,found in release: 3.16,found in release: 3.18

### 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. Create screen A and screen B. Screen A screen can navigate to screen B using `context.go` and `context.push`. The screen B's route is placed inside a `ShellRoute`
2. Create `CustomTransitionPage` for both `ShellRoute.pageBuilder` and B's `GoRoute.pageBuilder`. For visual purpose, transition in ShellRoute will have a fade in blue, whereas in B's Route will have a fade in red.
3. Navigate from the A screen to the B screen using 2 above methods, `go` and `push`

### Expected results

Because of #130406 (not sure if this is should be an expected thing), using `context.push` should result in a fade in red.
Using `context.go` should play both `ShellRoute` and B's `PageRoute` animation, hence display a fade in blue & red.

### Actual results

Using `context.push` should result in a fade in red (expected). However, using `context.go` only results in a fade in blue

### Code sample

<details><summary>Code sample</summary>

```dart
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';

void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp.router(
      routerConfig: _router,
    );
  }
}

class AScreen extends StatelessWidget {
  const AScreen({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('A Screen'),
      ),
      body: Column(
        children: [
          ElevatedButton(
            onPressed: () => context.go('/b'),
            child: const Text('Navigate by go'),
          ),
          ElevatedButton(
            onPressed: () => context.push('/b'),
            child: const Text('Navigate by push'),
          ),
        ],
      ),
    );
  }
}

class BScreen extends StatelessWidget {
  const BScreen({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        automaticallyImplyLeading: false,
        title: const Text('B Screen'),
      ),
      body: const Placeholder(),
    );
  }
}

// GoRouter configuration
final _router = GoRouter(
  routes: [
    GoRoute(
      path: '/',
      builder: (context, state) => const AScreen(),
    ),
    ShellRoute(
      builder: (context, state, child) => child,
      pageBuilder: (context, state, child) => CustomTransitionPage(
        child: child,
        transitionsBuilder: (context, animation, secondaryAnimation, child) {
          return Stack(
            children: [
              child,
              // Using a blue container to indicate more clearly that there is
              // a transition in shell route
              FadeTransition(
                opacity: animation.drive(Tween(begin: 1.0, end: 0.0)),
                child: Container(
                  color: Colors.blue,
                ),
              )
            ],
          );
        },
      ),
      routes: [
        GoRoute(
          path: '/b',
          pageBuilder: (context, state) => CustomTransitionPage(
            child: const BScreen(),
            transitionsBuilder:
                (context, animation, secondaryAnimation, child) {
              return Stack(
                children: [
                  child,
                  // Using a red container to indicate more clearly that there
                  // is a transition in child route
                  FadeTransition(
                    opacity: animation.drive(Tween(begin: 1.0, end: 0.0)),
                    child: Container(
                      color: Colors.red,
                    ),
                  )
                ],
              );
            },
          ),
        ),
      ],
    )
  ],
);

```

</details>


### Screenshots or Video

<details>
<summary>Screenshots / Video demonstration</summary>

[Upload media here]

https://github.com/flutter/flutter/assets/39979207/bec10596-769c-4459-b69c-33cf9b2e6b1d


</details>


### Logs

<details><summary>Logs</summary>

```console
[Paste your logs here]
```

</details>


### Flutter Doctor output

<details><summary>Doctor output</summary>

```console
[Paste your output here]
```

</details>