Repository: flutter
Issue: [macOS] App renders as a black on screen on macOS 12.5.1
Labels: engine,platform-mac,c: rendering,a: desktop,e: OS-version specific,P3,team-macos,triaged-macos

### Is there an existing issue for this?

- [x] I have searched the [existing issues](https://github.com/flutter/flutter/issues)
- [x] I have read the [guide to filing a bug](https://flutter.dev/docs/resources/bug-reports)

### Steps to reproduce

1. `flutter create flutter__test`
2.  `flutter run -d macos`

### Expected results

The application can be displayed normally

### Actual results

The application initially displays a black page, then may cause some random problems depending on the day and version.

The MacBook ventilates, can display black spots, displays bits of other windows, modifies the writing on VSCode and displays it in a very strange way, flickers between black screen and transparent screen, displaying part of the launchpad with very little opacity (see illustrations).
Depending on version and channel, it may display errors in the console.

### Code sample

The issue can reproduce with a newly created Flutter project.

### Screenshots or Video

<details>
<summary>Screenshots / Video demonstration</summary>

![image](https://github.com/flutter/flutter/assets/79168733/b034982d-b6f6-49ca-9445-d1fe6e9ae012)

![image](https://github.com/flutter/flutter/assets/79168733/6e289fa3-6dbf-4fae-8ff4-dbbddfd5aa72)

https://github.com/flutter/flutter/assets/79168733/c1d3116b-e5c2-495c-be99-5e348c626ee5

</details>


### Logs

 Logs of flutter run -d macos -v 

https://pastebin.com/16cDpEas

### Flutter Doctor output

<details><summary>Doctor output</summary>

```console
[!] Flutter (Channel master, 3.17.0-1.0.pre.13, on macOS 12.5.1 21G83 darwin-x64, locale fr-FR)
    • Flutter version 3.17.0-1.0.pre.13 on channel master at /Users/eliezayat/Documents/flutter
    ! Warning: `dart` on your path resolves to /usr/local/Cellar/dart/2.18.7/libexec/bin/dart, which is not inside your current Flutter SDK checkout at /Users/eliezayat/Documents/flutter. Consider adding
      /Users/eliezayat/Documents/flutter/bin to the front of your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision dca1f9e5c8 (il y a 62 minutes), 2023-11-03 13:38:46 -0400
    • Engine revision 72262a2380
    • Dart version 3.3.0 (build 3.3.0-91.0.dev)
    • DevTools version 2.29.0
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
    • Android SDK at /Users/eliezayat/Library/Android/sdk
    • Platform android-34, build-tools 32.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
    • 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 2020.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.10+0-b96-7281165)

[✓] VS Code (version 1.83.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.74.0

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-x64     • macOS 12.5.1 21G83 darwin-x64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 118.0.5993.117

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.
```

</details>