You need to change the Respawn Radius in settings to the lowest it can be.
It won't just mend over time, but instead as you use it. Now, instead of the durability going down when you use it, it will go up
The entire gimmick of Raids is the multiple waves. There is no bug here, just the intended mechanic.
I accidentaly put this in the wrong section. I meant for this to go in MCPE, sorry