Some thoughts from what it says in the ANO.
‘Pilot in command’ in relation to an aircraft means a person who for the time being is in charge of the piloting of the aircraft without being under the direction of any other pilot in the aircraft;
‘Commander’ in relation to an aircraft means the member of the flight crew designated
as commander of that aircraft by the operator thereof, or, failing such a person, the person who is for the time being the pilot in command of the aircraft;
Also Art 41:
41—(1)(a) The commander of a flying machine or glider registered in the United
Kingdom shall cause one pilot to remain at the controls at all times while it is in flight.
Taken together, those suggest to me that it is possible for two people to share the duties of pilot-in-command during a particular flight.
However, it makes most sense to appoint a 'commander' unambiguously at the start of the flight -- I'd certainly want to do so if I were the operator to avoid any misunderstandings about who had the responisbility for bringing my aeroplane back in one piece! As a matter of principle I always make a point of agreeing who is commander before a flight.