"and installed both Avast Free and Avast one"
Hi, Sorry. Yes my wording could have been better.
To clarify I only started to use Avast a week ago. To narrow down the timeframe of when this change to C:\ProgramData occurred, what I did do was install my daily incremental Macrium Reflect backups. Once I found the date that C:\ProgramData stopped being able to be hidden, I looked at what programs I had installed on or around that date - Avast One seemed a likely suspect.
For further elimination, I installed a clean fresh version of Windows 10 on a separate SSD to the SSD where I keep my current Windows 10 install. I installed Avast Free first, checked if C:\ProgramData could be hidden after being unhidden, uninstalled Avast Free then rebooted, carried out the same check, installed Avast One next and carried out the same check. And I installed both Avast Free and Avast One to confirm definitively that it was Avast AV causing this change to the normal behaviour of C:\ProgramData.
If I had been more familiar with Avast's settings, I would have saved myself some time and bother and tried the Self-Defence setting first.