Approximate energy conservation of symplectic A-stable Runge--Kutta methods for Hamiltonian semilinear evolution equations