Zeros of exceptional orthogonal polynomials and the maximum of the modulus of an energy function