Properly unmount the component when the shadow DOM is enabled.