It seems counter-intuitive to me that Elizabeth I was a powerful monarch at a time when women were considered inferior to men and when women didn't even have the right to vote in the UK until 1918. I understand that monarchs were believed to rule by divine right and had far-reaching powers, but why did kingdoms like England allow them to rule despite being a patriarchial society? One would think they would just crown a powerful duke if there was no male heir in the line of succession. The same is true for other kingdoms/empires across various cultures as well: Catherine the Great, Cleopatra, and Zenobia to name a few were all powerful women rulers in societies dominated by men.
It seems counter-intuitive to me that Elizabeth I was a powerful monarch at a time when women were considered inferior to men
In which ways? I ask, because that's quite an important caveat; many a King was judged as an inferior person to others without anyone deposing him in favour of the other
and when women didn't even have the right to vote in the UK until 1918.
Neither did many men. And in Tudor times we're talking about a long time before democracy in any case.
but why did kingdoms like England allow them to rule despite being a patriarchial society?
It was a Feudal society first and foremost, and this consideration could override others.
One would think they would just crown a powerful duke if there was no male heir in the line of succession.
Ah, but which one? Welcome to the War of the Roses Mark two. No one wanted that. There was of course the Protestant/Catholic issue, which indeed lead to many attempts to depose Elizabeth.
A patriarchal society does not mean that it absolutely disallows the possibility of rule by a female. It's merely made very difficult, and as it's made difficult, only a few ever get a shot at it, as your examples already point out.
Usually (?) this rule was presented in a bit different fashion - the law wasn't stating that "a woman cannot rule" but that "Queen cannot rule alone". So the most obvious solution for a capable woman willing to govern her country was either to stay unmarried (like Elisabeth I) or to...crown herself as a King. In this way, she was following the letter of the law bypassing such technicalities as gender.
There are quite a few examples of this: From Sobekneferu and Hatshepsut (there were apparently 5 female pharaohs in total) in the ancient Egypt, through King Jadwiga of Poland (Reign 16 October 1384 – 17 July 1399) and her sister Mary (crowned as a King of Hungary on 17 September 1382) to Maria Theresa (reign 13 September 1745 – 18 August 1765), who officially was (among other titles) a King and Archduke of Hungary. Even still currently ruling Elisabeth II is (again, among other titles) a Duke (not "Duchess") of Normandy, Lord of Mann and during the war, she almost became Prince of Wales.
Another real life examples can be found here