When this happens to our older cars, the problem was usually connected to the auxiliary fan not running.

When this happens, during idling or traffic standstill, the compressor doesnt get enough airflow to cool it down. But when you are moving, it gets that much needed airflow.

It could be during the work on your radiator fan (if it immediatelt happened after work was done), they may have inadvertenly disconnected a connector for that or it just happened to fail at that time (cant really say for certain).