Sorry to hear, my story resembles yours, might be helpful for you:
Despite proper oral hygiene, I've got 3 infections this year alone, including 2 abscesses while being < 30.
Asking the doctor for a possible systemic reason, she said "must've been pretty stressful period for you, hasn't it?"
Also experiencing lots of cavity problems since childhood and being unsatisfied by the doctor's root cause analysis, I finally found out the root cause for the dental problems 2 months ago myself: "Hypermobility" due to a connective tissue disorder. I was diagnosed with weak connective tissue in an orthopedic context years ago, but desperation and LLM-assisted research made the connection!
Finally found people like me at r/eds and r/hypermobile. Basically, connective tissue disorder means weaker collagen in the dentin, rwhich esults in being much more prone to cavity.
I believe when medical professionals make comments like your dentist, what they are truly trying to say is that investigating the cause is likely a moot effort.
However, many patients would probably be even more dissatisfied with such an answer. Sadly, knowing the underlying cause of a condition does not always translate into a better treatment protocol or prognosis.
I went my entire childhood and into early 20s before a new (to me) hygienist explained that most tooth decay is essentially an integral of PH level. The accumulation of how acidic your mouth is and for how long. They also explained that avoiding acidic foods and drinks is not enough, because bacteria that feeds on sugar produces an acidic byproduct. I adjusted my behavior based on that (consume way less sugar, and when having anything sugary or acidic, have it with hot water/tea/coffee) and my dental visits changed entirely since then.