The price of food bought by poorer people during the cost of living crisis rose more quickly than it did for those with higher incomes, according to new research.