Using a template binary sensor, but how can I ignore short periods of unavailable states in the source sensor?

yes, that’s true or false that there is data available. If you also add the default, it will show the default at that point when data is not available.
Search in the Docs for template examples or here in the forums.