Fixes race situation where `_onPlatformMessage` is triggered before the first frame, essentially skipping the first frame. Fixes https://github.com/flutter/flutter/issues/138193. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style