I have a 49" 5120x1440 ultrawide monitor with some windows always open on the sides and I don't want any kind of item hidden behind them (for example, mounted external drive, downloaded/copied file, etc...)
The worst case is when I save or move something to the Desktop and I waste a lot of time trying to understand why I can't see the file – because it's hidden, say, behind my music player window.
Right now I've badly solved the issue with a very inelegant solution, which is filling those areas with empty files so that nothing goes over there, the problem is that those then show up on Finder and it gets kind of annoying when I have to work with files on the Desktop
So, right now, there are two acceptable solutions for this:
Find a way to tell macOS not to put icons on a certain area of the screen
Find a way to tell Finder to not show, say, files with zero byte dimension or with a file name starting with "empty" or whatever filter we can apply.
EDIT: this would not work as there is no way to tell Finder to show a certain type of file on the Desktop but not in a Finder window. Disregard this option.
Here's a picture to better show you the problem and how I've partially (ie: badly) solved it for now:
EDIT: I believe that I need to make a point about the answers given so far (which are ALL very appreciated, by the way): All the answers have been addressing my own bad solution instead of addressing the original problem which is clearly explained in the title: "How to prevent macOS from putting icons on some areas of the desktop?"
This is the ultimate goal: I want to tell macOS "whenever I put something on the Desktop, DO NOT PUT IT INTO THOSE AREAS.
My solution was to fill those areas with empty documents, but it's ugly, not on the desktop, because those icons are hidden by the windows, but on a Finder window because it's filled with trash.
Hopefully this clears it up a bit!
EDIT 2: this is how it looks normally, those windows are ALWAYS there, so it doesn't matter that there are all those files behind them, but when I open a Finder window, they'll all be there. Hoping this helps it up more.