Glad to hear that your problem is solved.
Your explanation however doesn’t make any sense to me.
I run both Onedrive and Avast. Both are functioning without problems and,
the Avast icon is in my system tray.
What does Onedrive have to do with the prevention of the Avast system tray icon ???