Assalamu Alaikum,
According to Quran, ‘saleh’ deeds are acts which develop one’s capabilities. The verse means, if someone/ group of people repent, make amendments, keep away from evil deeds, reform, and work to develop their capabilities, Allah’s law will bring positive changes in them and this will transform their evil deeds into good deeds and thus give them protection from the deficiencies created from their wrong deeds.
Regards,
Optimist