When moving flag should always be in the hand closest to the pitch or referee. So when crabbing or running towards the goal line that is left hand, when running towards the half way line that is right hand. Offsides, goal kicks and corners always right hand, throw-ins and free kicks obviously defend on direction. All that of course assumes the referee is running a normal diagonal, otherwise you need to reverse it all.
The biggest reason for getting the flag hand wrong is when assistants change direction too much. Unless needing to move quickly it should be sideways movement, and that means the flag doesn't change hands.