No, the RN don't make the most senior person the captain. I have flown as captain sitting next to or in front of captains and commodores.
It tends to be a reasonable mix of most senior/suitable/qualified/current/capable in the current role is stitched to be captain. i.e. On a pinging trip the observer is slightly more likely to be the captain, but on a gh trip it is more likely to be a pilot.