`getContextChangedKeys` only handles class components:
https://github.com/facebook/react/blob/355591add41c0f6dad738fdb1b6603e0786b7b4e/packages/react-devtools-shared/src/backend/renderer.js#L1276-L1304
S
      pendingUnmountedRootID = id;
    } else if (!shouldFilterFiber(fiber)) {
       T
       w
       a
      if (isSimulated) {
        pendingSimulatedUnmountedIDs.push(id);
      } else {
        pendingRealUnmountedIDs.push(id);
      }
    }
    if (!fiber._debugNeedsRemount) {
      untrackFiberID(fiber);
      const isProfilingSupported = fiber.hasOwnProperty('treeBaseDuration');
      if (isProfilingSupported) {
        idToRootMap.delete(id);
        idToTreeBaseDurationMap.delete(id);
      }
    }
  }
  function mountFiberRecursively(
    firstChild: Fiber,
    parentFiber: Fiber | null,
    traverseSiblings: boolean,
    traceNearestHostComponentUpdate: boolean,
  ) {
     I
     T
    let fiber: Fiber | null = firstChild;