Repository: flutter
Issue: AndroidView overlapping other native views.
Labels: platform-android,a: platform-views,has reproducible steps,P2,team-android,triaged-android,found in release: 3.22

### Steps to reproduce

Steps to reproduce can be found in this Gist.
https://gist.github.com/RonakPustack/31424f212d309fc4375d9ff4fa2d73c4

### Expected results

Both the views, **VideoPlayer** and **PdfViewer** should've been independent from each other, and this was the case for a very long time, it seems like something in the latest flutter upgrade has caused this issue.

### Actual results

**Issue:**
I have a video player (better_player) and as I navigate to a non-opaque route that contains a PDF (specifically, pdf_flutter which uses AndroidView to render PDFs), I see this weird issue.

https://github.com/flutter/flutter/assets/25359214/2fdb8770-c795-4ab8-8185-67b53753d2ca

PDF Flutter: https://github.com/erluxman/pdf_flutter/blob/master/lib/pdf_flutter.dart#L286

---

This issue is specific to **Android**, and only occurs when one navigates to the PDF Screen via PageTransition opaque route. I need the route to remain opaque because I want my users to read the PDF as the video plays in background.


### Flutter Doctor output

<details open><summary>Doctor output</summary>

```console
[✓] Flutter (Channel stable, 3.19.6, on macOS 14.0 23A344 darwin-arm64, locale en-US)
    • Flutter version 3.19.6 on channel stable at /Users/ronakpustack/Dev/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

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
    • Android SDK at /Users/ronakpustack/Library/Android/sdk
    • Platform android-34, build-tools 33.0.1
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15A240d
    • CocoaPods version 1.13.0

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2023.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 17.0.9+0-17.0.9b1087.7-11185874)

[✓] VS Code (version 1.74.0-insider)
    • VS Code at /Applications/Visual Studio Code - Insiders.app/Contents
    • Flutter extension version 3.60.0

[✓] Connected device (3 available)
    • DN2101 (mobile) • FUFICAWSFEZXZLZ9 • android-arm64  • Android 13 (API 33)
    • macOS (desktop) • macos            • darwin-arm64   • macOS 14.0 23A344 darwin-arm64
    • Chrome (web)    • chrome           • web-javascript • Google Chrome 124.0.6367.201

[✓] Network resources
    • All expected network resources are available.

• No issues found!
```

</details>