Repository: flutter
Issue: SystemUiMode.manual shifts UI on Android
Labels: platform-android,framework,customer: vroom,a: layout,has reproducible steps,P2,found in release: 3.7,team-android,triaged-android

## Steps to Reproduce

1. Execute `flutter run` on the code sample
2. Press the buttons to change the `SystemUiMode`

**Expected results:**
The UI does not shift when switching between `SystemUiMode`s

**Actual results:**
The UI shifts (this does not happen on iOS)

<details>
<summary>Code sample</summary>

```dart
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

void main() async {
  runApp(const SwitchUiPage());
}

enum Mode { edgeToEdge, manual }

class SwitchUiPage extends StatelessWidget {
  const SwitchUiPage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            mainAxisSize: MainAxisSize.min,
            children: [
              ElevatedButton(
                child: Text(Mode.edgeToEdge.name),
                onPressed: () => _setUiMode(Mode.edgeToEdge),
              ),
              ElevatedButton(
                child: Text(Mode.manual.name),
                onPressed: () => _setUiMode(Mode.manual),
              ),
            ],
          ),
        ),
      ),
    );
  }

  void _setUiMode(Mode mode) {
    switch (mode) {
      case Mode.edgeToEdge:
        SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge);
        break;
      case Mode.manual:
        SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual,
            overlays: [SystemUiOverlay.bottom, SystemUiOverlay.top]);
        break;
    }
  }
}
```

</details>

<details>
  <summary>flutter doctor -v</summary>

```
[✓] Flutter (Channel stable, 3.7.0, on macOS 13.1 22C65 darwin-arm64, locale en-US)
    • Flutter version 3.7.0 on channel stable at /Users/tdavis/dev/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision b06b8b2710 (6 days ago), 2023-01-23 16:55:55 -0800
    • Engine revision b24591ed32
    • Dart version 2.19.0
    • DevTools version 2.20.1

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at /Users/tdavis/Library/Android/sdk
    • Platform android-33, build-tools 33.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14C18
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.3)
    • 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 11.0.13+0-b1751.21-8125866)

[✓] VS Code (version 1.74.3)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.58.0

[✓] Connected device (4 available)
    • sdk gphone64 arm64 (mobile) • emulator-5556                        • android-arm64  • Android 13 (API 33) (emulator)
    • iPhone 11 (mobile)          • 5CA53DAB-0FDC-4438-91BA-6923B107B41B • ios            •
      com.apple.CoreSimulator.SimRuntime.iOS-16-2 (simulator)
    • macOS (desktop)             • macos                                • darwin-arm64   • macOS 13.1 22C65 darwin-arm64
    • Chrome (web)                • chrome                               • web-javascript • Google Chrome 109.0.5414.119

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!
```

</details>

[ui_mode_android.webm](https://user-images.githubusercontent.com/6393575/215366712-f6eb62fe-fec5-4eb2-9cf0-ab6724a0df33.webm)

https://user-images.githubusercontent.com/6393575/215366714-7de3f3c8-066c-43aa-aea5-0c2fb6adc6bd.mp4