Dominant species maintain ecosystem function with non-random species loss