What type of device and browser/app/email client are you using?
Oh, logging in directly to Xfinity. I'm not using Outlook client, etc.
Collapse the folders in the left pane down to their minimum. Now sign out of the account and back in again. It should remember the way it was when you signed out.
Yes, I have done that. That is the behavior I was expecting, but no success. This has been going on for several years, so it is not a new issue. No matter i fthere is just one sub-folder or several, they always are expanded when I log back in.