It works. It is the symbol of the keys and the closing-not-opening and opening-not-closing that points to the Keys in Mt. 16. It is what the keys DO. Are you referring to verse 25?
I would look at that in a couple of different ways.
First, the prime minister’s office continues, even when the PM NEEDS to be removed.
Second, Isaiah’s context is the earthly Davidic Kingdom, not the Kingdom of Christ – David’s kingdom is a shadow; the Keys of that kingdom are a shadow of the Keys “of the kingdom of heaven” promised to Peter.
Third (getting a little “out there” hermeneutically here), just as the old Adam is replaced by the new Adam in Christ, the old kingdom with its fallible prime ministers, is replaced by the new Kingdom, where the Lord is King forever and his vicar(s) stand to serve until He comes again. OK. That may be asking the text to support more than it can. But it is consistend and Paul used the method of showing out how the “new” is the opposite or a contrary improvement upon the “old”; my speculation is not a novel way of reading the typology.