Weapons can be repaired in Dying Light 2, but it's not done in the usual methods we've come to know and understand. Instead of going to a vendor and paying them to repair gear, or using an item to bring back that sweet durability, you will be using Weapon Mods to repair them.
If a weapon can be modded, it'll be visualised on the inventory screen with small circles beside each weapon icon. This means you can attach a mod to either the tip, shaft, or grip. Placing a mod on a weapon repairs it somewhat and gives it back some durability. All mods return 50 durability to a weapon, with some of the best gear in the game having 200+ durability in total.
You can also buy and upgrade mods that specifically target durability. For example, there's a mod called Reinforcement that lowers the amount of durability lost from each hit. It can be upgraded to be better and better if you have the correct crafting parts.
However, once you have attached a mod to either the tip, shaft, or grip, that mod cannot be replaced. Therefore, you can only do so much to stop weapon durability from draining. There will come a point where the weapon completely breaks. Because of this, we recommend using the weapon without any mods until the durability has worn down enough to where mods will completely repair it. There's no way to make a weapon indestructible, but you can at least stop it from breaking for a time.