A Bayesian network approach to trophic metacommunities shows habitat loss accelerates top species extinctions