I'm also seeing MAJOR memory leak with Sonoma, major one being "WindowServer".
The conclusion of the many tests I've done the last couple days to track this down (because it annoyed me so much) is that it is linked to external monitors.
MacOS freshly rebooted not connected to an external monitors does not exhibit such issue.
Then I connect my external monitor (Dell UltraSharp 32 6K Monitor - U3224KA - native res i.e. no scaling), do not start anything (especially the buggy DDPM Dell tool), leave it doing nothing over 1 full night and 1 full day and WindowServer process is showing up around 9GB (coming from less than 1GB before when no external monitor was connected).
Because I have the M3 Max with 128Gb, I noticed this when, with my traditional workflow, all my memory tools showed me that the system was using swap, was compressing memory already, and memory pressure was constantly increasing.
Over 1 or 2 weeks (or even less) WindowServer was easily consuming a whopping 200GB!
App Memory was showing that almost all my RAM was consumed despite no other process than WindowServer was showing abnormal amounts of RAM usage.
This is driving me crazy.