I am a former submariner, but for the US Navy, not the Brits. I do know we share a lot of similarities in how we stand in-port "watches". Everything forward of the engine room, or the nuclear reactor to be precise, is basically considered the forward compartment (FC). There are normally 2 - 3 "watches" that are manned in the FC. (We are not including the CPO/Officer watches for those who were in the military

)
The "Below Decks" watch is a roving watch whose main responsibility is to rove around inside the sub and check gauges.
The "Topside" watch is located on the sub, next to the gangplank to control access to the ship from the pier via the gangplank
The "Pier Sentry" watch is located on the pier, next to the gangplank to control access to the gangplank. This watch is not always used, but since this was a "show" stop for VIPs and such, there is a good chance one was utilized
For us, the Pier Sentry was armed with a night stick, except for when we were in the Middle East. Below Decks was not armed in any fashion. The Topside watch was the only one who had a firearm and that was a pistol. During watch turnover, we were required to unload the mag and count the bullets, but never were we allowed to chamber a round.
I found a follow up article stating the shooting happened while the VIPs were on board the sub.
Last thing, it also stated that most serious offenses that happen in the military while they are physically in GB are handled by the Civilian courts, not the military
Mark