If you have a system of hereditary rulers then by definition ALL of them are legitimate targets in a war.
Royalty gets the perks, but in war they are is viable and legitimate a target as a rifleman aiming in or an artilleryman crewing a Howitzer.
I will pass on the romanticized hand wringing over the Romanovs, I left my fainting couch in my other house.
As one of Polish heritage, the Romanovs were not kind to the Polish people, but still, they didn’t deserve that fate.
First they were not killed by Germans or Austrians. They were murdered by Communists. The victims, with one exception, were all women and children plus a handful of loyal domestic servants. I’m not sure what your idea of legitimate warfare is, but I’m guessing ISIS likes your way of thinking.