On a recent Mac, clicking an empty bit of wallpaper can make every window slide off the screen so you see the desktop and its widgets. Some people love it. I think a lot more people click next to a window by accident, see everything vanish, and have no idea what just happened. You can choose when it happens.
The choice lives in Desktop & Dock settings. On current versions the pop-up is called Show Desktop; older versions call it “Click wallpaper to reveal desktop”. Pick the Stage Manager option and a wallpaper click only clears the screen while Stage Manager is on.
System Settings > Desktop & Dock > Desktop & Stage Manager
Show Desktop: Only in Stage Manager on Click
(other choice: Always on Wallpaper Click)
An example: with two half-screen windows and a strip of wallpaper between them, every miss-click on that strip used to hide both. After the change, the click does nothing and your windows stay where they are. If you still want to see the desktop now and then, Apple has a keyboard shortcut for it: Command-Mission Control (or Fn-H on keyboards with a Globe key). Press it again to bring the windows back.
The caveat is Stage Manager. With Stage Manager turned on, a click on the wallpaper still moves the windows aside, whichever option you pick, because both choices include that case. If that bothers you as well, it’s Stage Manager itself you want to switch off.
Further reading: Organize your Mac desktop with Stage Manager, Change Desktop & Dock settings on Mac, Mac keyboard shortcuts (Apple Support)