NSApplicationActivateAllWindows works for me in Sonoma and later, with the caveat that I am using it to bring another app forward, not my own.
Topic:
UI Frameworks
SubTopic:
AppKit
Tags: