Distinct charge dynamics in battery electrodes revealed by in situ and operando soft X-ray spectroscopy