what is the cause whereby compressor working gets hot and stops, after cooled down picks up
Assuming the condenser coil is reasonably clean, possibly a weak run capacitor on the compressor.  If you have made changes to the refrigerant such as you would be required to when replacing the dryer then more likely contamination with a noncondensible like air or overcharge of refrigerant.

Edit:  I have assumed, perhaps incorrectly, that you are in the US.  Voltage too high or frequency too low for the compressor rating could also cause the compressor and condenser to get very hot.