Repository: ant-design
Issue: ConfigProvider property getPopupContainer does not set the rendering node for Tour component
Labels: Inactive,improvement

### Reproduction link

[![Edit on CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/p/sandbox/gracious-thunder-nfppw9?file=%2Fsrc%2FApp.tsx)

### Steps to reproduce

1. Create a ConfigProvider that use getPopupContainer which returns a reference to a HTMLElement all popups should attach to:
```
...
const rootElementForPopup = useRef<HTMLDivElement>(null);
  return (
    <div ref={rootElementForPopup} className="App">
      <ConfigProvider
        getPopupContainer={() => {
          return rootElementForPopup.current as HTMLElement;
        }}
      >
        ...
      </ConfigProvider>
    </div>
  );
...
```
2. Create a Modal that will be hooked to that render node:
```
...
const [modalOpen, setModalOpen] = useState<boolean>(false);
  const rootElementForPopup = useRef<HTMLDivElement>(null);
  return (
    <div ref={rootElementForPopup} className="App">
      <ConfigProvider
        getPopupContainer={() => {
          return rootElementForPopup.current as HTMLElement;
        }}
      >
        <Button onClick={() => setModalOpen(true)}>Open modal</Button>
        <Modal open={modalOpen}>
          ...
        </Modal>
      </ConfigProvider>
    </div>
  );
...
```
3. Open the Modal and see in the DOM that it will be hooked to the correct HTMLElement. Now add a Tour component. In the example it was added inside the modal (which is what we actually tried to do when we found this bug), but it can also be added outside of the Modal:

```
export const TestTour = (p: TProps) => {
  const [open, setOpen] = useState<boolean>(false);

  const steps: TourProps["steps"] = [
    ...
  ];
  return (
    <>
      <Button type="primary" onClick={() => setOpen(true)}>
        Explore
      </Button>
      <Tour open={open} onClose={() => setOpen(false)} steps={steps} />
    </>
  );
};
...
const [modalOpen, setModalOpen] = useState<boolean>(false);
  const rootElementForPopup = useRef<HTMLDivElement>(null);
  return (
    <div ref={rootElementForPopup} className="App">
      <ConfigProvider
        getPopupContainer={() => {
          return rootElementForPopup.current as HTMLElement;
        }}
      >
        <Button onClick={() => setModalOpen(true)}>Open modal</Button>
        <Modal open={modalOpen}>
          <TestTour />
        </Modal>
      </ConfigProvider>
    </div>
  );
...
```
4. See that the TestTour elements are not added under the same HTMLElement as the Modal is, but added at the default level. If we set getPopupContainer on the Tour component explicitly, it will correctly attach the div that contains the tour, but not the mask. This makes it so that the content in the Tour element cannot be clicked when the target on the current open step is set to null. 

### What is expected?

The getPopupContainer on ConfigProvider should set the render node for the Tour element, and getPopupContainer on the Tour component should also set the render node for the mask.

### What is actually happening?

The Tour HTML elements are not placed under the render node that is set by getPopupContainer defined on the ConfigProvider, and when setting it on the actual Tour component, it only sets the render node for the div that holds the content, not the mask.

| Environment | Info |
| --- | --- |
| antd | 5.14.1 |
| React | 18.0 |
| System | Windows 10.0.19045 Enterprise  |
| Browser | Chrome 121.0.6167.161 |

---
A proposal would be to solve this in the similar way as you have done for Modal, where you have an ant-modal-root element which holds all elements, including the mask under itself. Then you can have getPopupContainer to move that root element to the correct render node, both when getPopupContainer is set from the ConfigProvider and on the actual Ant component.

<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->