Long story short, if someone uses Team Preview to change their lead mon in a fight, the sprite of the first Pokemon sent out is still the mon in "Pokemon 1".
Screenshot as proof:
As you can see in this shot, Heatran is the active Pokemon in the log, yet the max HP is that of Deoxys-D. (The remaining HP, however, is correct.)
Screenshot as proof:
As you can see in this shot, Heatran is the active Pokemon in the log, yet the max HP is that of Deoxys-D. (The remaining HP, however, is correct.)