## 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




return (
          <head>
            <title>
              <IndirectTitle />
            </title>
          </head>
        );
      }
      if (gate(flags => flags.enableFloat)) {
        await expect(async () => {
          await act(() => {
            const {pipe} = renderToPipeableStream(<App />);
            pipe(writable);
          });
        }).toErrorDev([
          'React expects the `children` prop of <title> tags to be a string, number, or object with a novel `toString` method but found an object that appears to be a React element which never implements a suitable `toString` method. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert children of <title> tags to a single string value which is why rendering React elements is not supported. If the `children` of <title> is a React Component try moving the <title> tag into that component. If the `children` of <title> is some HTML markup change it to be Text only to be valid HTML.',
        ]);
      } else {
        await expect(async () => {
          await act(() => {
            const {pipe} = renderToPipeableStream(<App />);
            pipe(writable);
          });
        }).toErrorDev([
          'A title element received a React element for children. In the browser title Elements can only have Text Nodes as children. If the children being rendered output more than a single text node in aggregate the browser will display markup and comments as text in the title and hydration will likely fail and fall back to client rendering',
        ]);
      }
      if (gate(flags => flags.enableFloat)) {