## React version
React version: 18.3.0-next-b0671f9ea-20230130

## Problem
In `StrictMode`,  when using hydrateRoot to render a component that using `useSyncExternalStore` it seems that useSES will do hydration twice. 

But in second hydration process,  useSES does not use the result of `getServerSnapshot` as initial state, which will cause hydration error.

This problem will only happen in `development` mode, 

## Reproduce
Link to code example:
https://codesandbox.io/s/useses-18-3-rojznv

It works well in react 18.2
https://codesandbox.io/s/useses-18-2-13iskc




});
  it('does not send the external runtime for static pages', async () => {
    await act(() => {
      const {pipe} = renderToPipeableStream(
        <html>
          <head />
          <body>
            <p>hello world!</p>
          </body>
        </html>,
      );
      pipe(writable);
    });
    
    expect(document.getElementsByTagName('script').length).toEqual(0);
    
    expect(document.documentElement.innerHTML).toEqual(
      '<head></head><body><p>hello world!</p></body>',
    );
  });
  it('#24384: Suspending should halt hydration warnings and not emit any if hydration completes successfully after unsuspending', async () => {
    const makeApp = () => {
      let resolve, resolved;
      const promise = new Promise(r => {
        resolve = () => {
          resolved = true;
          return r();
        };
      });
      function ComponentThatSuspends() {