You need to open the settings for the scheduled scan that you are running.
AvastUI > Scan (icon) > Scan for viruses - from the next screen, from the drop down menu select the scan.
Now click the Scan Settings at the bottom of that screen > Scheduling > Uncheck the Shut down the system after the scan finishes.