Regardless of whether the connection is via cable or wireless, Mercedes-Benz recommends disconnection only when the vehicle is stationary.
Ending Apple CarPlay®
To end the connection of Apple CarPlay® (cable):
disconnect the connection via the connecting cable between the iPhone® and multimedia system. To end the connection of Apple CarPlay® (wireless):
de-authorise the iPhone® in the device list under the application.