My chapel was attacked, I used the Repair ability, then I ungarrisoned my prelate, then tried to regarrison, then it was destroyed and I couldn’t put a new prelate in the building when I fully repaired it.
I think this bug has been around since the beginning.