What casues macOS sidebar to drop "favorites" (shortcuts to linked files/directories), other than macOS updates? How to prevent?
I do not know what's causing you to loose the customizations you've made to items under Favorites in the Sidebar of Finder or how to prevent it, however here is a backup and restore solution for when it does happen. This should certainly be easier then manually having to restore all the lost items under Favorites in the Sidebar of Finder.
At one time, items under Favorites in the Sidebar of Finder were stored in the ~/Library/Preferences/com.apple.finder.plist file and then the ~/Library/Preferences/com.apple.sidebarlists.plist file.
However, they are now stored in:
~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.FavoriteItems.sfl2

Which version of macOS it was changed to the later I'm not sure, however certainly in macOS Mojave and later it is in com.apple.LSSharedFileList.FavoriteItems.sfl2 file.
In at least macOS Mojave and later, to backup this file after the items you always want to be under Favorites in the Sidebar of Finder, to then later restore as needed, first do the following in Terminal:
cd ~/Library/Application\ Support/com.apple.sharedfilelist/
cp com.apple.LSSharedFileList.FavoriteItems.sfl2 com.apple.LSSharedFileList.FavoriteItems.sfl2.Custom

With that done, if and when the items under Favorites in the Sidebar of Finder get reset and your customizations are lost, then do the following to restore them:
In Terminal:
cd ~/Library/Application\ Support/com.apple.sharedfilelist/
cp com.apple.LSSharedFileList.FavoriteItems.sfl2.Custom com.apple.LSSharedFileList.FavoriteItems.sfl2

Then immediately press ⇧⌘Q and then Enter to Log Out.
Once the log out is complete, you can log in and the Favorites in the Sidebar of Finder will be back to your customized settings.

Note: You may have to give Full Disk Access to Terminal in System Preferences &gt; Security &amp; Privacy &gt; Privacy in order to run the aforementioned commands.