Presumably, unless they were spectacularly incompetent, the Tantive IV was not broadcasting its ID and/or diplomatic status when they fled from the battle, and only turned it on when they were clean away.
One Corellian Corvette looks pretty much like every other from the outside, so unless the Imperials could match specific identifying details to the ship that ran away from them at the end of Rogue One, technically as long as they keep insisting they're a Consular ship on a diplomatic mission, Vader would be obligated to honor their diplomatic immunity or the Senate would certainly frown at the Emperor in a most disappointed fashion and tell him such things are not acceptable, and if Darth Vader persists they will certainly write a strongly worded letter about it.
It's a diplomatic fig leaf, yes, but it's all they have -- well, all they think they have, because the Senate has been dissolved and the Emperor no longer even pretends to care about what they have to say, but they don't know that yet.