The dismiss button of an Alert does not works into a component with a ShadowDom. The method useInShadowDom can do this job.