Universality of the third-order phase transition in the constrained Coulomb gas