PC Magazine has a utility called
WinTidy that will save your desktop layout and allow you to restore it if it gets disorganized. If you're not a PC Mag subscriber, you'll need to pay $7.97 for a one-time utlity download, or you can pay $19.97 and get complete access to their utilities for one year.
WinTidy is the lowest cost option I know of. There are plenty of third-party software programs that can also be obtained for this purpose but the cost will be higher. For example,
Easy Desktop Keeper. For more, see this Google search:
lock desktop icons.