It takes some times hours before a door is able to be repaired this should be no more than 60 seconds to repair gives defenders a small chance to fix them
I noticed the "Keep is under attack" message happens even if someone pulls a guard, attacks a guard, etc. The door should only not be repairable if players are hitting it. If they're not actively hitting the door, it should clear about a few minutes to allow people to repair.
I don't understand how pulling guards prevents the door from being repaired. That needs to be looked at.