If the AC system is opened in any way, such as removing a line or component, then some refrigerant may be lost. In this case, it is good practice to recharge the system with the required amount and type of refrigerant, which may involve removing and replacing some of the old coolant.
When replacing the AC compressor, it is possible that some of the coolant might leak out during the process. It is important to check the coolant level after the repair is completed and add more if necessary. If a significant amount of coolant has leaked out, it may be necessary to evacuate and recharge the system.
It is recommended that you consult the vehicle's repair manual or a qualified mechanic for specific instructions and recommendations regarding coolant replacement when replacing an AC compressor.