The favorites are stored in the local App database. Which is stored in ./joplin-desktop/database.sqlite. If you have a complete backup of the joplin-desktop folder you should also have a backup of your favorites. Once you replace the database file after reinstalling the app and installing the plugin, your saved favorites should reappear.