The ozone layer is heavier than oxygen and is thermodynamically unstable, yet the interaction between ozone production and dissociation has a dynamic equilibrium. As a result, they avoid settling near the ground.
O2 (g) → O (g) + O (g)
O (g) + O2 (g) → O3 (g) (g)