Sun exposure is sufficiently correlated with so many health benefits that it is almost certainly causative for those benefits – especially lower rates of heart disease. Endogenous Vitamin-D production is just one mechanism/signal of the sun's influence, not the full story, so supplementation of Vitamin-D can't reproduce all the sun's benefits.
And, other than preventing sunburns, the health benefits of sunscreen are suspiciously under-proven, and the potential effects of long-term exposure-to/blood-absorption-of their ingredients under-studied. In another decade or two, the current levels of sunscreen use, and recommendation by expert bodies that should know better, will likely be considered a public health failure up there with "use margarine not butter" or "replace fats with sugars" or "masks don't help against respiratory epidemics".
Use shade not sunscreen whenever possible.
https://www.arpansa.gov.au/our-services/monitoring/ultraviol...
I'm totally with you on shade over sunscreen though, I only put sunscreen on my face, and just try to shade everything else. Sadly my skin hates sunscreen too!
Instead, there's a dose-response curve, as with almost everything else, and some moderate level of UV exposure is almost certainly net-beneficial.
Further, getting a light natural tan from the sun itself, without ever becoming uncomfortably burned, is probably more indicative of that optimal level of UV exposure than remaining ultra-pale from absolute avoidance of all sun-UV.
I haven't had any bone fracture issues (thankfully) since I'm still young, but low vitamin D levels can also apparently give you brain fogginess and depression, which I'm suffering from.
But it does seem like Vitamin D testing isn't on most normal testing regimes, it was only when I presented with depression that I got tested.