Repository: flutter
Issue: Different deeplinking url between onGenerateInitialRoutes and onGenerateRoute
Labels: framework,f: routes,has reproducible steps,P3,team-framework,triaged-framework,found in release: 3.27,found in release: 3.28

### Steps to reproduce

1. Run the code sample
2. Run this command to test deeplink. 
```shell
adb shell 'am start -a android.intent.action.VIEW \
  -c android.intent.category.BROWSABLE \
  -d "https://example.com/test"' \
  com.example.test
```
3. Note the printed value of `onGenerateRoute` method
4. Stop the app
5. Run `flutter logs`
6. Run this command again
```shell
adb shell 'am start -a android.intent.action.VIEW \
  -c android.intent.category.BROWSABLE \
  -d "https://example.com/test"' \
  com.example.test
```
7. Note the printed value by `onGenerateInitialRoutes` method

### Expected results

The two printed values should be the same

### Actual results

The two values are different. `onGenerateInitialRoutes` keeps all the url `https://example.com/test` while `onGenerateRoute` keeps only the path `/test`.

### Code sample

<details open><summary>main.dart</summary>

```dart
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    final route = MaterialPageRoute(builder: (context) => Text('Page'));
    return MaterialApp(
      title: 'Example',
      onGenerateRoute: (settings) {
        print(settings.name);
        return route;
      },
      onGenerateInitialRoutes: (intitialRoute) {
        print(intitialRoute);
        return [route];
      },
    );
  }
}
```

</details>

<details open><summary>AndroidManifest.xml</summary>

```xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
    <application
        android:label="test"
        android:name="${applicationName}"
        android:icon="@mipmap/ic_launcher">
        <activity
            android:name=".MainActivity"
            android:exported="true"
            android:launchMode="singleTop"
            android:taskAffinity=""
            android:theme="@style/LaunchTheme"
            android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
            android:hardwareAccelerated="true"
            android:windowSoftInputMode="adjustResize">
            <!-- Specifies an Android theme to apply to this Activity as soon as
                 the Android process has started. This theme is visible to the user
                 while the Flutter UI initializes. After that, this theme continues
                 to determine the Window background behind the Flutter UI. -->
            <meta-data
              android:name="io.flutter.embedding.android.NormalTheme"
              android:resource="@style/NormalTheme"
              />
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
            <intent-filter android:autoVerify="true">
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <data android:scheme="https" android:host="example.com" />
            </intent-filter>
        </activity>
        <!-- Don't delete the meta-data below.
             This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
        <meta-data
            android:name="flutterEmbedding"
            android:value="2" />
    </application>
    <!-- Required to query activities that can process text, see:
         https://developer.android.com/training/package-visibility and
         https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.

         In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
    <queries>
        <intent>
            <action android:name="android.intent.action.PROCESS_TEXT"/>
            <data android:mimeType="text/plain"/>
        </intent>
    </queries>
</manifest>
```

</details>

### Flutter Version

Flutter version 3.28.0-0.1.pre on channel beta