Tough economic times, like the current cost-of-living crisis, can cause the gender pay gap to widen, a senior economics academic says.