Minor skirmishes are not war. China and India have border skirmishes with literal wooden sticks, neither side will use live ammo because they both have nukes.
It's demonstrably the case that attacks can take place between nuclear powers and not escalate to war. Why do you think that is?