HybridMask wrote:

Why does the mode in the charger change from CC to CV when the batteries are almost completely charged?

Because it is the way of charging lithium batteries.

Current is limited in the first phase of the charging process because the battery will try to grab as many amps as it can.
This is due to the voltage difference between the charger voltage and the battery voltage and the low internal resistance of the battery.

Once the voltages are almost equal, the current will drop accordingly.
At this point constant current limiting is no longer require and constant voltage take over.