There is currently a debate about these supposed a11y issues. Some are about what happens to focus after dismissal, some are about related elements and announcements, some are about buggy implementations and non support from screen readers.
However it is my belief that these were mostly true 2-3 years ago but the myth has remained. And people still belief there are issues.
I've heard from actual screen reader users that these supposed issues are mostly non-issue. And pale in comparison from people implementing their own.
I still would be careful using it! MDN has a section on accessibility considerations: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/di...
The W3C also has a pretty great set of examples of how to make complex widgets like dialogs accessible (not that a11y is just a checklist): https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/