In pair production the two antiparticles always move in opposite direction I wonder why is that so though I know it is to conserve energy but the basic principle unlike charged particle attract should we dump it in this case?
The principle is not being dumped. The thing that you are missing is the difference between acceleration and velocity.
In pair production, the particles have velocities in opposite directions. However they attract each other, both of them will decelerate.
Thing is it as throwing a ball upwards. The ball is attracted by the earth and yet you can throw it against the attraction. The particles are similarly thrown away.
Simply because of momentum conservation.