And the appearance of the Malbork Castle in 1945. It was destroyed at 50% during the war. In 50' it was scheduled for demolition. Fortunately, the idea was given up soon and was made a decission about rebuilding of the castle to the state it looked like in the Middle Ages.
Another favorite are Byzantine castles which range from the fall of the Western half of the Roman Empire to the eventual demise of Constantinople to the Ottoman's in 1453. This is not counting the Empire of Trebizond (1204-1461) or the Despotate of Epirus (1204-1479) either, who built numerous castles themselves.
Angelokastro Byzantine Castle Corfu Ionian Sea
Byzantine Castle of Mystras
What lead to their continued use was the conquest of the Empire by the Latins, the Venetians, and the eventual successor to them all, the Ottoman Empire. Many more to follow as I dig through my records.