The Holy Roman Empire of the German Nation (Heiliges Römisches Reich der Deutschen Nation) continued to exist up until the Reichsdeputationshauptschluß of 1803, at least in name, until finally dissolving on August 6, 1806, when the last Holy Roman Emperor Franz II abdicated.
One could argue that it legally continued through the House of Habsburg-Lothringen until 1918.
Regards,
I had an old history professor that said of the Holy Roman Empire:
“It was not holy.
It was not Roman.
and it was not an empire.”
Lol.