That depends on your swing speed. If you have a slow swing speed, there’s a good chance that a stiff shaft will reduce the distance that you hit the ball. In this case, the most likely culprit is too little backspin, which can drastically reduce carry distance.
If you have a high swing speed (100+ MPH), you could find that a stiff shaft unlocks the ideal backspin and launch conditions for your particular swing characteristics.
Ultimately, it all boils down to finding the ideal apex (maximum height the ball reaches) for your swing.
A shaft that is too soft may balloon vertically, preventing you from achieving the maximum horizontal distance. On the other hand, a shaft that is too stiff probably won’t generate enough backspin, leading to a low ball flight and less than optimal carry distance.
Your goal is to find the perfect amount of backspin for your particular swing seed. Generally speaking, the higher your swing speed, the less backspin you require to achieve the optimal apex for your swing.