Repository: flutter
Issue: Overlay Portal shows above Drawer but behind of ModalBottomSheet
Labels: framework,f: material design,has reproducible steps,P3,team-design,triaged-design,found in release: 3.19,found in release: 3.21

### Steps to reproduce

1. Open dart pad and paste example code
2. Run code
3. Press show/hide tooltip (show)
4. Press showModalBottomSheet (tooltip is behind)
5. Close showModalBottomSheet
6. Press Drawer button (tooltip us above)

### Expected results

When open Drawer, Overlay Portal must be behind of Drawer box.

### Actual results

Tooltip with Overlay Portal

<img width="400" src="https://github.com/flutter/flutter/assets/69091719/6a5ff217-d659-4c51-afa1-b957b609ef6b">


Tooltip is behind when open bottom sheet
<img width="353" alt="image" src="https://github.com/flutter/flutter/assets/69091719/1b749012-396d-445f-a215-272136b9c3cf">

Tooltip is above when open Drawer
<img width="351" alt="image" src="https://github.com/flutter/flutter/assets/69091719/a95d35c9-605e-4d5c-bbfd-3456490f0754">

### Code sample

<details open><summary>Code sample</summary>

```dart

import 'package:flutter/material.dart';

/// Flutter code sample for [OverlayPortal].

void main() => runApp(const OverlayPortalExampleApp());

class OverlayPortalExampleApp extends StatelessWidget {
  const OverlayPortalExampleApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        drawer: Drawer(),
        appBar: AppBar(
          title: const Text('OverlayPortal Example'),
        ),
        body: Column(
          children: [
            const Center(
              child: ClickableTooltipWidget(),
            ),
            Center(
              child: BottomSheetExample(),
            ),
          ],
        ),
      ),
    );
  }
}

class ClickableTooltipWidget extends StatefulWidget {
  const ClickableTooltipWidget({super.key});

  @override
  State<StatefulWidget> createState() => ClickableTooltipWidgetState();
}

class ClickableTooltipWidgetState extends State<ClickableTooltipWidget> {
  final OverlayPortalController _tooltipController = OverlayPortalController();

  @override
  Widget build(BuildContext context) {
    return TextButton(
      onPressed: _tooltipController.toggle,
      child: DefaultTextStyle(
        style: DefaultTextStyle.of(context).style.copyWith(fontSize: 50),
        child: OverlayPortal(
          controller: _tooltipController,
          overlayChildBuilder: (BuildContext context) {
            return const Positioned(
              right: 50,
              bottom: 50,
              child: ColoredBox(
                color: Colors.amberAccent,
                child: Text('tooltip'),
              ),
            );
          },
          child: const Text('Press to show/hide tooltip'),
        ),
      ),
    );
  }
}

class BottomSheetExample extends StatelessWidget {
  const BottomSheetExample({super.key});

  @override
  Widget build(BuildContext context) {
    return Center(
      child: ElevatedButton(
        child: const Text('showModalBottomSheet'),
        onPressed: () {
          showModalBottomSheet<void>(
            context: context,
            builder: (BuildContext context) {
              return Container(
                height: 200,
                color: Colors.amber,
                child: Center(
                  child: Column(
                    mainAxisAlignment: MainAxisAlignment.center,
                    mainAxisSize: MainAxisSize.min,
                    children: <Widget>[
                      const Text('Modal BottomSheet'),
                      ElevatedButton(
                        child: const Text('Close BottomSheet'),
                        onPressed: () => Navigator.pop(context),
                      ),
                    ],
                  ),
                ),
              );
            },
          );
        },
      ),
    );
  }
}

```
</details>

### Screenshots or Video

_No response_

### Logs

<details open><summary>Logs</summary>

```console
[Paste your logs here]
```

</details>


### Flutter Doctor output

<details open><summary>Doctor output</summary>

```console
[✓] Flutter (Channel stable, 3.16.5, on macOS 14.2.1 23C71 darwin-arm64, locale es-419)
    • Flutter version 3.16.5 on channel stable at /Users/richarcangui/fvm/versions/3.16.5
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 78666c8dc5 (3 months ago), 2023-12-19 16:14:14 -0800
    • Engine revision 3f3e560236
    • Dart version 3.2.3
    • DevTools version 2.28.4

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at /Users/richarcangui/Library/Android/sdk
    • Platform android-34, build-tools 33.0.0
    • 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.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15E204a
    • CocoaPods version 1.14.2

[✓] 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)

[✓] IntelliJ IDEA Ultimate Edition (version 2023.2.5)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • 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

[✓] VS Code (version 1.87.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.84.0

[✓] Connected device (4 available)
    • iPhone de Richar (mobile) • 00008120-00044C500C00C01E            • ios            • iOS 17.4.1 21E236
    • iPhone 15 Pro (mobile)    • 15020842-5914-437D-9BD3-57DA71D5DB59 • ios            •
      com.apple.CoreSimulator.SimRuntime.iOS-17-4 (simulator)
    • macOS (desktop)           • macos                                • darwin-arm64   • macOS 14.2.1 23C71 darwin-arm64
    • Chrome (web)              • chrome                               • web-javascript • Google Chrome 123.0.6312.58
    ! Error: Browsing on the local area network for iPad de Richar. Ensure the device is unlocked and attached with a cable
      or associated with the same local area network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)
    ! Error: Browsing on the local area network for Apple Watch de Richar. Ensure the device is unlocked and discoverable
      via Bluetooth. (code -27)

[✓] Network resources
    • All expected network resources are available.

• No issues found!

```

</details>