To manually start Avast screen saver I use button preview.

I killed all the background processes and tried again. Avast nows runs in foreground. It seems to work now. I don’t know why Avast screensaver suddenly started as a background process. It is the first time that it happens and by coincidence just after the Avast program update.