I have been having exactly the same issue when attempting to use Dropbox folders as Files app favourites. They seem to show up initially under favourites on the Browse screen but if I open a file or exit the app they have disappeared next time I return to the Browse screen. Usually they will reappear if I then return to the app several hours later but unfortunately they don’t stay.
The app doesn’t seem to entirely forget the favourites, as if I navigate to one and long press on it then the option to ‘unfavourite’ appears. The issue rather seems to be that folders from 3rd party storage services intermittently fail to show up on the Browse screen on the files app. The behaviour occurs on both my iPhone and iPad (both running iOS 12.1) so I suspect it is a bug with the favourites functionality in the Files app.