I fully hrok the distinction between the RANK of OF-4 (Commander) v. Commanding Officer, the official title of the skipper of a ship.
BBC's Vigil, Season 1, Episode 4 has a continuity error that portrays CO Neil Newsome as OF-5 (Captain), but in previous episodes Newsome was OF-4 (Commander). Which rank is correct? I'm guessing OF-5 for 3 reasons.
Unquestionably, nuclear submarines would benefit from OF-5 by being critical (as nuclear deterrent), abstruse and byzantine. OF-4 usually commands smaller ships like destroyers, like USN Commander Ernest Krause in Greyhound (2020) and USN Commander Kara Green (née Foster) in Last Ship (2014-2018).
I can't reason why a navy WOULDN'T require at least OF-5 to CO a submarine! Why would a Navy prefer an OF-4 to an OF-5? It's straightforward for a navy to promote an OF-4 to OF-5, if somehow there aren't enough OF-5s!
In real life, many OF-5s aren't wise or sensible. In 2017 Oct 31, a RN submarine OF-4 Commander was involved in a sex scandal. On Apr 30 2020, RN Commander Jonathan Lewis was relieved. On Oct 19 2020, a RN Lt Commander was inebriated.