The consistent pattern with Iran is that the Islamic terror regime views the UK as the weaker partner and the easier target in the US-UK alliance.
It’s why Iran will test its attacks against the UK first, for example with its hostage taking of military personnel. It will go after UK targets, like the tanker, and, after President Trump solidly smacked down Iran for attacking the US embassy in Baghdad, it arrested a British ambassador.
Attacking the UK is obviously a test. It’s also a way for the regime to show off without having to worry about real consequences. And it, once again, warns the Europeans that siding with the US will carry a price.
That said, after Iran’s repeated attacks on foreign diplomats, no country should have diplomatic staff in the terror state. Certainly no western nation should maintain diplomatic facilities there. Diplomatic personnel in Iran are just hostages to fortune.