The oaths of allegiance to the monarch are a practical solution to the problem of loyalty and partisanship.
None of the key institutional structures (the law, the military, parliament or the church) owes loyalty to the PM.
On the other hand, we had a civil war in the seventeenth century which assured the government and people of their powers.
So our system has two parts: the operational part, which is democratic; and the trust and stability part, which belongs to the monarch.
We don't really have a problem with the transfer of power. Our risk is that the monarch is a nutcase, in which case a regent takes over. But even a nutcase monarch is not responsible for the administration of the government. So he/she can't do much.