Stupid question about vegetables.

I've always heard (and never really fully bought) the theory that the longer you cook your veg, the fewer nutrients the finished product will contain. But if I make, say, a marinara sauce, with lots of veggies, and I let it simmer for several hours, am I losing a meaningful amount of the nutrients? Especially since I've always heard that the nutrients don't "go away" they just dissolve into the cooking liquid, which is then discarded. But with a sauce or soup, you're eating the liquid they were cooked in.

So...am I losing anything? Do the veggies in my sauce count? Or am I not getting the benefit at all?

/stupid question.