### Description

Currently we have a test that verifies auto following behavior regarding leader and follower cluster restart.

However remote cluster is disabled before the leader restart and configured again after:

https://github.com/elastic/elasticsearch/blob/33b3ccaabc6960f02c005b6bc14a1c527a24875b/x-pack/plugin/ccr/src/internalClusterTest/java/org/elasticsearch/xpack/ccr/RestartIndexFollowingIT.java#L92-L96

This happens as leader cluster changes the port during the restart and otherwise would become not accessible.
x-pack/plugin/ccr/src/internalClusterTest/java/org/elasticsearch/xpack/ccr/RestartIndexFollowingIT.java
if (remoteMaxPendingConnectionListeners == 1) {
            
            
            assertBusy(this::isRemoteConnected);
        } else {
            assertTrue(isRemoteConnected());
        }
    }
    private boolean isRemoteConnected() throws Exception {
        var infos = followerClient().execute(RemoteInfoAction.INSTANCE, new RemoteInfoRequest()).get().getInfos();
        return infos.size() == 1 && infos.get(0).isConnected();
    }
    private Integer getRemoteMaxPendingConnectionListeners() {
        var response = followerClient().admin().cluster().prepareNodesInfo("_local").clear().setSettings(true).get();
        var settings = response.getNodes().get(0).getSettings();
        return RemoteConnectionStrategy.REMOTE_MAX_PENDING_CONNECTION_LISTENERS.get(settings);
    }
    private void cleanRemoteCluster() throws Exception {
        ClusterUpdateSettingsRequest updateSettingsRequest = new ClusterUpdateSettingsRequest().masterNodeTimeout(TimeValue.MAX_VALUE);
        updateSettingsRequest.persistentSettings(Settings.builder().put("cluster.remote.leader_cluster.seeds", (String) null));
        assertAcked(followerClient().admin().cluster().updateSettings(updateSettingsRequest).actionGet());
        assertBusy(() -> {
            List<RemoteConnectionInfo> infos = followerClient().execute(RemoteInfoAction.INSTANCE, new RemoteInfoRequest())
                .get()
                .getInfos();
            assertThat(infos.size(), equalTo(0));
        });
    }
}