function cleanup() {
    unbindMonitor();
    unmount === null || unmount === void 0 || unmount();
    document.body.removeChild(container);
  }
For some frameworks (eg `react@18+` with `ReactDOM.createRoot().render()`) the rendering
 inside the `container` does not occur until after a microtask.

 Notes:
   - This will run before the browser takes it's picture of the element
   - This will run before the animation frame that removes `container`.