The Smart Cleaning on LG G5 tries to delete your idle apps as well as unused files and apps' cache to manage your storage. To stop LG Smart Cleaning from uninstalling apps on LG G5, do as follows:
1. Open the Settings app and go to the General tab
2. Under the Phone Management settings, touch to open the Smart Cleaning option
3. Hit the 3-dot button on the top right side of the screen and open the Settings menu
4. Open the Idle Time Period settings and select the 6 Months option
5. Now, go back and see the Idle Apps list under the Items to Clean list. Your apps will be added to the Idle Apps after being unused for 6 months. And you don't have to worry about uninstalling them via the Smart Cleaning tool on your LG G5.
Note that, these idle apps won't be uninstalled unless you Clean them by yourself.