### Website or app

https://react.dev

### Repro steps

1. Go to components tab.
2. For any component, try to copy the value in props, hooks etc. to clipboard.

![image](https://user-images.githubusercontent.com/75756768/228340421-a901498a-1308-4e8f-b502-989f4c60331f.png)


### How often does this bug happen?

Every time

### DevTools package (automated)

_No response_

### DevTools version (automated)

_No response_

### Error message (automated)

_No response_

### Error call stack (automated)

_No response_

### Error component stack (automated)

_No response_

### GitHub query string (automated)

_No response_
),
        };
      }
    }
    return {
      dataForRoots,
      rendererID,
      timelineData,
    };
  }
  function startProfiling(shouldRecordChangeDescriptions: boolean) {
    if (isProfiling) {
      return;
    }
    recordChangeDescriptions = shouldRecordChangeDescriptions;
     Capture initial values as of the time profiling starts.
     It's important we snapshot both the durations and the id-to-root map,
     since either of these may change during the profiling session
     (e.g. when a fiber is re-rendered or when a fiber gets removed).
    displayNamesByRootID = new Map();
    initialTreeBaseDurationsMap = new Map(idToTreeBaseDurationMap);
    initialIDToRootMap = new Map(idToRootMap);
    idToContextsMap = new Map();
    hook.getFiberRoots(rendererID).forEach(root => {
      const rootID = getFiberIDThrows(root.current);
      ((displayNamesByRootID: any): DisplayNamesByRootID).set(
        rootID,
        getDisplayNameForRoot(root.current),
      );
      if (shouldRecordChangeDescriptions) {