I used the solution to disable auto focus when open the dialog and also avoid auto focus on the last selected button. I see that it works well for both dialog and bottom sheet control in Angular Material, see the code:
As of version 14 boolean values are no longer supported. So to disable focus using autoFocus you can pass a query selector of something that doesn't exist.
@breaking-change
14.0.0 Remove boolean option from autoFocus. Use string or AutoFocusTarget instead.