I believe the best clarificstion there is that you have to consider the person and the office separately. When acting as the president and largely executing his duties as defined by Congress and the Constitution, he can't be charged. If the person does something outside of the office's powers then immunity doesn't hold.
Meaning, if the president shoots a random bystander on the street they can be charged with murder. If the president orders a military strike as part of an official operation and done through proper channels, they can't be charged if it later turns out the intel was bad or the strike went wrong in some way.