Dialog element and shadow DOM - first element is in a closed shadow root

After opening the dialog, the focused element should be the one in the closed shadow root.