Repository: flutter
Issue: [webview_flutter] Back/forward navigation error on some sites (e.g twitter, instagram)
Labels: platform-ios,p: webview,package,has reproducible steps,P2,found in release: 2.10,found in release: 2.13,team-ios,triaged-ios

## Steps to Reproduce

I'm trying to navigation on my webview but especially some sites e.g twitter, instagram it stays stuck (You can see the message in log section). But it works for google, e.a.
<!-- Please include full steps to reproduce so that we can reproduce the problem. -->

1. Execute `flutter run` on the code sample <!-- (see "Code sample" section below) -->

**Expected results:** Successful controller navigation for some sites.

**Actual results:** Let's consider that I'm running "loadUrl()" for twitter.com again and again. It can load site succesfully. Then I loaded the google.com. After than I tapped the navigationBack which is running goBack() func. It stucks like in logs. But for vice versa I can go back to google.com

<details>
<summary>Code sample</summary>

Here's my infoPlist part: 
```
	<key>NSAppTransportSecurity</key>
	<dict>
		<key>NSAllowsArbitraryLoads</key>
		<true/>
		<key>NSAllowsArbitraryLoadsInWebContent</key>
		<true/>
	</dict>
```
When textfield is done this code working.
```
  Future<void> goToSite(String siteUrl) async {
    await _controller.future;
    final WebViewRequest request = WebViewRequest(
      uri: Uri.parse(url),
      method: WebViewRequestMethod.get,
    );
    await _webController.loadRequest(request);
  }
```

```
 Widget browser() {
    return WebView(
      initialUrl: 'https://${_urlController.text.toLowerCase()}',
      javascriptMode: JavascriptMode.unrestricted,
      onWebViewCreated: (WebViewController webViewController) {
        if (!_controller.isCompleted) {
          _controller.complete(webViewController);
          _webController = webViewController;
        }
        print("web created");
      },
      onProgress: (int progress) {
        print('WebView is loading (progress : $progress%)');
        if (progress == 100) {
          notify();
        }
      },
      navigationDelegate: (NavigationRequest request) {
        print('allowing navigation to $request');
        return NavigationDecision.navigate;
      },
      onPageStarted: (String url) {
        print('Page started loading: $url');
      },
      onPageFinished: (String url) {
        print('Page finished loading: $url');
      },
      gestureNavigationEnabled: true,
      backgroundColor: const Color(0x00000000),
    );
  }
```
I have 2 button for navigation and they use
~~~
    await _webController.goBack();
    await _webController.goForward();
~~~

</details>

<details>
  <summary>Logs</summary>

Here is where it is stuck:

```
[assertion] Error acquiring assertion: <Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}>
[ProcessSuspension] 0x152efaee0 - ProcessAssertion: Failed to acquire RBS assertion 'ConnectionTerminationWatchdog' for process with PID=10293, error: Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}
[assertion] Error acquiring assertion: <Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}>
[ProcessSuspension] 0x152efaf40 - ProcessAssertion: Failed to acquire RBS assertion 'WebProcess Background Assertion' for process with PID=10293, error: Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}
flutter: Page started loading: https://mobile.twitter.com/
[assertion] Error acquiring assertion: <Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}>
[ProcessSuspension] 0x152efb060 - ProcessAssertion: Failed to acquire RBS assertion 'ConnectionTerminationWatchdog' for process with PID=10294, error: Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}
[assertion] Error acquiring assertion: <Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}>
[ProcessSuspension] 0x152efb0c0 - ProcessAssertion: Failed to acquire RBS assertion 'WebProcess Background Assertion' for process with PID=10294, error: Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}
flutter: Page started loading: https://mobile.twitter.com/
...
...
...
```


Flutter anaylze output has only "unused import" warnings.


```
[✓] Flutter (Channel stable, 2.10.3, on macOS 12.0.1 21A559 darwin-arm, locale tr-TR)
    • Flutter version 2.10.3 at /Users/burcus/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 7e9793dee1 (5 weeks ago), 2022-03-02 11:23:12 -0600
    • Engine revision bd539267b4
    • Dart version 2.16.1
    • DevTools version 2.9.2

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/burcus/Library/Android/sdk
    • Platform android-31, build-tools 31.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/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 13.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.2

[✓] 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)

[✓] IntelliJ IDEA Community Edition (version 2021.2.4)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 65.2.3
    • Dart plugin version 212.5741

[✓] VS Code (version 1.58.2)
    • VS Code at /Users/burcus/Downloads/Visual Studio Code.app/Contents
    • Flutter extension version 3.25.0

[✓] Connected device (2 available)
    • iphone’s iPhone (mobile) • 9ca8e19fecf0a833b736c162f9e10e051bd4c35a • ios            • iOS 15.2.1 19C63
    • Chrome (web)             • chrome                                   • web-javascript • Google Chrome 100.0.4896.75

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

```

</details>


<!--
      Consider also attaching screenshots and/or videos to better
      illustrate the issue.

      You can upload them directly on GitHub.
      Beware that video file size is limited to 10MB.
-->