I have the same thing. 2 ASUS (PA248, PA278QV) displays, 5 spaces. Mac Studio 12.3.1.
All the Windows for all applications are gathered onto the monitor with the Dock, in all spaces.
My systems is NOT sleeping. It happens when the screensaver is activated for a while. That is, if I do Command-Control-Q and login again, it's OK. If I go away for a while, it's not.
I, too, have lots and lots of windows. The thought of having to deal with this for any length of time is extremely frustrating.
I know it's not while sleeping because:
@max[git:master]$ pmset -g log | grep sleep | grep powerd | tail -100
2022-04-07 08:40:14 -0700 Assertions PID 69(powerd) Released PreventUserIdleSystemSleep "Powerd - Prevent sleep while display is on" 00:25:14 id:0x0x10000801c [System: PrevIdle NetAcc kCPU]
2022-04-07 08:55:14 -0700 Assertions PID 69(powerd) Summary PreventUserIdleSystemSleep "Powerd - Prevent sleep while display is on" 00:10:13 id:0x0x100008554 [System: PrevIdle DeclUser NetAcc kCPU kDisp]
2022-04-07 09:17:40 -0700 Assertions PID 372(powerd) Released PreventUserIdleSystemSleep "Powerd - Prevent sleep while display is on" 00:12:58 id:0x0x100008063 [System: DeclUser kDisp]
2022-04-07 09:19:10 -0700 Assertions PID 372(powerd) Released PreventUserIdleSystemSleep "Powerd - Prevent sleep while display is on" 00:00:30 id:0x0x100008203 [System: DeclUser kDisp]
2022-04-07 09:34:10 -0700 Assertions PID 372(powerd) Summary PreventUserIdleSystemSleep "Powerd - Prevent sleep while display is on" 00:14:52 id:0x0x100008207 [System: PrevIdle DeclUser kDisp]
2022-04-07 19:00:49 -0700 Assertions PID 93(powerd) Released PreventUserIdleSystemSleep "Powerd - Prevent sleep while display is on" 02:02:59 id:0x0x10000804c [System: PrevIdle DeclUser kDisp]
2022-04-07 20:15:49 -0700 Assertions PID 93(powerd) Summary PreventUserIdleSystemSleep "Powerd - Prevent sleep while display is on" 00:08:21 id:0x0x1000088c3 [System: PrevIdle DeclUser kDisp]
2022-04-07 20:30:49 -0700 Assertions PID 93(powerd) Summary PreventUserIdleSystemSleep "Powerd - Prevent sleep while display is on" 00:23:21 id:0x0x1000088c3 [System: PrevIdle DeclUser kDisp]
2022-04-07 20:45:49 -0700 Assertions PID 93(powerd) Summary PreventUserIdleSystemSleep "Powerd - Prevent sleep while display is on" 00:38:21 id:0x0x1000088c3 [System: PrevIdle DeclUser kDisp]
2022-04-07 21:00:49 -0700 Assertions PID 93(powerd) Summary PreventUserIdleSystemSleep "Powerd - Prevent sleep while display is on" 00:53:21 id:0x0x1000088c3 [System: PrevIdle DeclUser kDisp]
2022-04-07 21:15:49 -0700 Assertions PID 93(powerd) Summary PreventUserIdleSystemSleep "Powerd - Prevent sleep while display is on" 01:08:21 id:0x0x1000088c3 [System: PrevIdle DeclUser kDisp]
2022-04-07 21:26:33 -0700 Assertions PID 93(powerd) Released PreventUserIdleSystemSleep "Powerd - Prevent sleep while display is on" 01:19:06 id:0x0x1000088c3 [System: DeclUser kDisp]
2022-04-07 21:29:07 -0700 Assertions PID 93(powerd) Released PreventUserIdleSystemSleep "Powerd - Prevent sleep while display is on" 00:02:24 id:0x0x100008b92 [System: DeclUser kDisp]
2022-04-08 04:59:07 -0700 Assertions PID 93(powerd) Summary PreventUserIdleSystemSleep "Powerd - Prevent sleep while display is on" 00:00:12 id:0x0x100009130 [System: PrevIdle DeclUser NetAcc kCPU kDisp]
2022-04-08 04:59:24 -0700 Assertions PID 93(powerd) Released PreventUserIdleSystemSleep "Powerd - Prevent sleep while display is on" 00:00:30 id:0x0x100009130 [System: DeclUser SRPrevSleep kCPU kDisp]
2022-04-08 06:44:24 -0700 Assertions PID 93(powerd) Summary PreventUserIdleSystemSleep "Powerd - Prevent sleep while display is on" 00:06:10 id:0x0x10000935b [System: PrevIdle DeclUser kDisp]
pid 93(powerd): [0x0000c0540001935b] 00:15:45 PreventUserIdleSystemSleep named: "Powerd - Prevent sleep while display is on"
@max[git:master]$