McDonald’s sales fell for the first time since 2020 as the world’s biggest restaurant chain plays catch-up with rivals.