The UK is non-republican because it's governed by Her Majesty's Government, but democratic because the actual power to choose the government belongs to the common people.
The US is republican because the government is constituted by We The People. If it became non-democratic, it would likely remain republican because changing a government's theory of legitimacy is harder than changing how the government actually works.
You stop having a republic when rulers start picking their replacements. You'd lose the republicanism if say, Joe Biden appointed Hunter Biden to be the next president or if it became tradition that the next Trump always gets voted in as president.
Things like democracy and the electoral college tend to protect republicanism, but both can exist without maintaining the republic