The mode switches immediately after changing the COMM_MODE bit. Doing so during charging does not interfere with the charge state machine on datasheet page 33. Charging will not be terminated or restarted from IDLE (POR) in the flowchart shown on datasheet page 33.