Miami seems to have a bug in the pit entry where you are put a lap ahead. There is a video of it above.
I have also heard (from other people) that it is purely only happening in online. High chance that Miami wouldn't be raced if this glitch isn't fixed as soon as possible.