Do not assume that changing the office automatically bypasses the reapplication period.
McKinsey recruiting systems can connect applications across offices, and a previous interview outcome may still be visible even if you apply in another geography or for a somewhat different role. The exact restriction can also vary depending on what your recruiter told you after the rejection.
The safest approach is to contact the recruiter who handled your original application. If you are planning another attempt, this guide to reapplying after a consulting rejection can also help you think through the timing and what should change before you reapply. Ask specifically whether the waiting period applies to another office and whether the Dubai role would be treated as a separate application.
If the new role is genuinely different, particularly an expert or specialist position, the answer may be different from simply reapplying for the same generalist position elsewhere. But get confirmation before submitting rather than trying to interpret the rule yourself.