How it works?
Just right click on any door, and if it has a friend of the same type next to it, both will open or close!
Well sometimes, due to how the game works... The game could not see the door you're openning but instead the other one and the doors won't open (a raycast problem).
So just sneak and the datapack will pause.