Emphasize the fun activities awaiting them. Use transitions to mentally prepare the child to let the parent leave. You can ask the child to walk to the window to watch their parent leave. Wave goodbye and then begin an activity that the child enjoys. Make up a ritual for leaving.
Children feel secure with set patterns.
If the child is in a panic, ask the parent to stay until the tears and the crying has quieted. Ask the parent to comfort their distraught child in a firm but loving voice. Only leave when the child has calmed down. Talk with the child about what happened. Never criticize the child for feeling sad or angry.