Spatial coexistence of coinvading communities with mutualism and competition