Restores surface size in the postTest of test binding (#87240)

diff --git a/packages/flutter_test/lib/src/binding.dart b/packages/flutter_test/lib/src/binding.dart
index 8c34a61..a3c94d0 100644
--- a/packages/flutter_test/lib/src/binding.dart
+++ b/packages/flutter_test/lib/src/binding.dart
@@ -889,6 +889,11 @@
     _parentZone = null;
     buildOwner!.focusManager.dispose();
     buildOwner!.focusManager = FocusManager()..registerGlobalHandlers();
+    // Reset surface size. The renderview configuration is tied with it and
+    // needs to be recreated. Don't use [handleMetricsChanged] because it
+    // introduces unwanted side effects.
+    _surfaceSize = null;
+    renderView.configuration = createViewConfiguration();
     // Disabling the warning because @visibleForTesting doesn't take the testing
     // framework itself into account, but we don't want it visible outside of
     // tests.