While true, you have to remember their supply costs increased too, huge knockoff effects.
McDonald's is a public company you can see all the data yourself. Basically they did as well in 2023 as they did in 2019 from an operating income percentage. Meaning taking into account all sales and stuff (revenue) and subtracting all expenses like the cost of food, wages, taxes, real estate, whatever (expenses) the remaining bit is profit. And that value is the same per dollar earned as 2019. It's less than many years prior too.
Which means they corrected properly for the economic climate they're in.