I have a program that displays an NSSavePanel as a sheet. Mostly it works. However, it can get into a bad state after I display an ordinary window as a sheet. In that bad state, the code that normally displays the NSSavePanel instead just beeps. I can put a breakpoint on NSBeep and confirm that NSBeep is being called, but there is nothing useful in the stack trace (running on macOS 11.5.2) to suggest what the problem might be. No error message is printed in the debug log.
I might guess that when I displayed the window as a sheet the sheet was not fully cleaned up, but I can show the window as a sheet any number of times without any obvious problem.