Repository: flutter
Issue: Android chromium-based browsers show different sizes when open a new tab for the first time
Labels: platform-android,platform-web,c: rendering,has reproducible steps,P2,browser: chrome-android,team-web,triaged-web,found in release: 3.19,found in release: 3.21

### Steps to reproduce

1- Tested on Pixel 7 using Android 14.
2- Use the code attached.
3- Run the flutter webapp like this `flutter run -d web-server --web-port 8080 --web-hostname 0.0.0.0` .
4- Open the web from your mobile device in a new tab and see the issue.
5- Tap on the screen to fix the height.

### Expected results

See that the border surrounds the entire screen and paint the size correctly

### Actual results

not showing all full border in height and we have to tap the screen in order to size the border and height correctly.

### Code sample

<details open><summary>Code sample</summary>

```dart
void main() {
  runApp(const HomePage());
}

class HomePage extends StatefulWidget {
  const HomePage({super.key});

  @override
  State<HomePage> createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
  Color color = Colors.purple;

  @override
  void initState() {
    WidgetsBinding.instance.addPostFrameCallback((timeStamp) async {
      await Future.delayed(const Duration(seconds: 2));
      setState(() {
        color = Colors.white;
      });
    });
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Container(
          decoration: BoxDecoration(
            color: Colors.blue,
            border: Border.all(
              color: color,
              width: 8.0,
            ),
          ),
          child: Center(
            child: Text('${MediaQuery.sizeOf(context).height}'),
          ),
        ),
      ),
    );
  }
}
```

</details>


### Screenshots or Video

<details open>
<summary>Screenshots / Video demonstration</summary>

The first time we open the tab/page

https://github.com/flutter/flutter/assets/4898256/ea7b7cdf-72e9-4ab4-a211-68bc11950d0f


Once the tab/page is loaded, if we refresh, it works as expected


https://github.com/flutter/flutter/assets/4898256/a0e2ae2f-1514-4e8f-961d-0ab87f21327a




</details>


### Logs

_No response_

### Flutter Doctor output

<details open><summary>Doctor output</summary>

```console
[✓] Flutter (Channel stable, 3.19.4, on macOS 14.4 23E214 darwin-arm64, locale en-PE)
    • Flutter version 3.19.4 on channel stable at /Users/diegoveloper/fvm/versions/3.19.4
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 68bfaea224 (4 days ago), 2024-03-20 15:36:31 -0700
    • Engine revision a5c24f538d
    • Dart version 3.3.2
    • DevTools version 2.31.1

[✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
    • Android SDK at /Users/diegoveloper/Library/Android/sdk
    • Platform android-33, build-tools 32.0.0
    • ANDROID_HOME = /Users/diegoveloper/Library/Android/sdk
    • 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 15.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15E204a
    • CocoaPods version 1.13.0

[✓] 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.81.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.70.0

[✓] VS Code (version 1.88.0-insider)
    • VS Code at /Applications/Visual Studio Code - Insiders.app/Contents
    • Flutter extension version 3.85.20240301

[✓] Connected device (4 available)
    • Pixel 7 (mobile)       • 28291FDH2009RB                       • android-arm64  • Android 14 (API 34)
    • iPhone 14 Pro (mobile) • 6EAE64F4-2A91-49B8-B616-BF90818B51BC • ios            • com.apple.CoreSimulator.SimRuntime.iOS-16-4 (simulator)
    • macOS (desktop)        • macos                                • darwin-arm64   • macOS 14.4 23E214 darwin-arm64
    • Chrome (web)           • chrome                               • web-javascript • Google Chrome 123.0.6312.58

[✓] Network resources
    • All expected network resources are available.
```

</details>