For sure. I don't feel bad about the failures where lessons were learned at a reasonable cost.
Years back I co-founded a startup. My co-founder had a compelling idea and raised money. Being big fans of user-testing and intrigued by the then-new Lean Startup approach, we aggressively tested the hypotheses using throwaway prototypes. For a couple hundred thousand dollars, we proved that it wouldn't work, so we pivoted to something else.
We learned later that two other startups had basically the same idea, but they built whole products and tried to make them work. Between them they spent $12 million to learn the same lesson. Our failure was a bummer at the time, but looking back I feel proud of it.