Sadly the RN declined to take on the constabulary function a long time ago. Presumably ASW & Carriers (even Invincible Class ones) are sexier. Shades of the Convoy escort Vs Battleship debate of WW1 & 2.
No one is considering the consolidated maritime picture around the UK & responsibility is split between Customs, Police, Coastguard etc etc. Its a shambles. And to anyone who thinks that a terrorist won't try to hit a ship with a RIB full of explsives I would point out that the USS Stark was victim to such an attack a few years ago. I doubt that many people really thought that terrorists would fly 3 airliners into major US landmarks either but they did. TBH I'm surprised that a maritime attack of a tanker or ferry hasn't happened already.