If you no longer want to display desktop when clicking on the wallpaper, in this tutorial see step by step Disable Desktop View to Click on Wallpaper in Macos Sonoma. The new feature entered by Apple to provide Fast access to desktop and default to desktop widgets.
Sonoma macOS It comes with many interesting news and features, and the introduction of Desktop Widgets is one of them. Is for the first time an operating system for Mac supports widgets directly on the desktop.
To provide access to Desktop Widgets as quickly as possible, Apple has introduced a setting to see desktop through a simple click on Wallpaper. All open applications pass hidden on the sides of the screen. Their return to the screen is also done by a simple click on the desktop.
The quick visualization of the workspace is not a new feature. The combination of keys Fn+F11 was already doing this, and users laptops MacBook Pro Touch Bar models have long dealt with this feature. It is the new mode of activation by simple click on the desktop, which for many users is disturbing. Including me. So, if you do not want to disappear all open applications when clicking on Desktop, the best idea is to disable this option for Macos Sonoma.

How do you disable Desktop View to Click on Wallpaper in Macos Sonoma
Desktop viewing option when clicking on Wallpaper in Macos Sonoma operating system is called “Click wallpaper to show desktop items“. This can only be left active when used “Stage Manager“.
System Settings → Desktop & Dock

Choose this option to be available only when activated “Stage Manager“.
Also from here you can activate / disable Total Desktop Widgets and ITms (folders, files, drives) on the desktop.