what happens actually is that when we study chemistry then we study the effects of any change "ON THE SYSTEM" and hence when work is done on the system we suppose that energy is gained by the system and hence it is taken as +ve and when energy is lost i.e. work is one by the system then it is taken as -ve . Whereas in physics we observe the effect of change on the surroundings , hence when work is done by the system, energy is gained by surroundings and hence is taken as +ve in physics and whn work is done on the sys. it is taken as -ve coz surroundings lose energy. i hope the sign convension is clear now
(pls do rate me if u accept the answer)