Uncertainty-aware Latent Safety Filters for Avoiding Out-of-Distribution Failures