It looks like they adjusted for the common cofactors. There could be more they missed, but this study is also backed by a large body of research that found similar effects. You can see some of these other papers in the references.
Probably the effect is driven by several factors including mental well-being, increased social cohesion, reduced air pollution, increased opportunity for exercise, and other things. Frankly, it would be surprising if these things did not have an effect on lifespan.
It looks like they adjusted for the common cofactors. There could be more they missed, but this study is also backed by a large body of research that found similar effects. You can see some of these other papers in the references.
Probably the effect is driven by several factors including mental well-being, increased social cohesion, reduced air pollution, increased opportunity for exercise, and other things. Frankly, it would be surprising if these things did not have an effect on lifespan.