This happens to me on my iMac, but not my Mac Mini, even though they are always running the latest non-beta version of macOS. And not all of my favorites disappear, but many do. VERY frustrating. Many of them are OneDrive folders, but that can't be the issue because they're the same folders I dragged to the Favorites sidebar on my Mac Mini and those don't disappear.
So as a workaround, what I'm doing is creating a "favorites" folder in my home directory and putting aliases in there for all the folders I normally had over in my sidebar. Then I drag the "favorites" folder to the Finder sidebar. So now if macOS decides to randomly remove THAT folder from the sidebar, all I have to do is drag ONE folder back, not many.