By default F-Stop stores tags in internal database. If you use “Save metadata” (for all images with added tags), then it will embed tags into images. In your case, you probably didn’t do that. So hen you hid folders, F-Stop removed images from it’s database (together with their tags). When you unhid them again, F-Stop rescaned those images and added them to database but your tags were already removed.

Make sure you always save your metadata into images by “Save metadata”. Easiest way to do this is to select “Update metadata” in the navigation drawer on the left side and then select all images and select “Save metadata”. That will save metadata for all images that need this.