Assessing the validity of the thermodynamic uncertainty relation in quantum systems