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




stores: Array<StoreConsistencyCheck<any>> | null,
  
  memoCache?: MemoCache | null,
};
type BasicStateAction<S> = (S => S) | S;
type Dispatch<A> = A => void;
let renderLanes: Lanes = NoLanes;
let currentlyRenderingFiber: Fiber = (null: any);
let currentHook: Hook | null = null;
let workInProgressHook: Hook | null = null;
let didScheduleRenderPhaseUpdate: boolean = false;
let didScheduleRenderPhaseUpdateDuringThisPass: boolean = false;
let shouldDoubleInvokeUserFnsInHooksDEV: boolean = false;
let localIdCounter: number = 0;
let thenableIndexCounter: number = 0;
let thenableState: ThenableState | null = null;
let globalClientIdCounter: number = 0;
const RE_RENDER_LIMIT = 25;
let currentHookNameInDev: ?HookType = null;
let hookTypesDev: Array<HookType> | null = null;
let hookTypesUpdateIndexDev: number = -1;
 In DEV, this tracks whether currently rendering component needs to ignore
 the dependencies for Hooks that need them (e.g. useEffect or useMemo).
 When true, such Hooks will always be "remounted". Only used during hot reload.
let ignorePreviousDependencies: boolean = false;
function mountHookTypesDev(): void {
  if (__DEV__) {
    const hookName = ((currentHookNameInDev: any): HookType);
    if (hookTypesDev === null) {
      hookTypesDev = [hookName];