I have the same issue and I think it's because of a recent update. On my system I've isolated it to a privacy setting, "Never remember history". If I reset to defaults the sidebar open/close state is retained.Settings > Privacy & Security > History...