Unfortunately your experience reflects mine as well, at high levels the way casters just absolutely shut down encounters before they even begin can be pretty gross. The DM's solution to this way to make enemy saves ridiculously high and giving way too many creatures legendary resistances (instead of putting in more encounters in one adventuring cycle...) and casters almost immediately became the other extreme, very weak. This just isnt the way the game was designed.
At the risk of sounding like a broken record, the first thing any DM should do to remedy this is to not make it so easy to take a long rest, either by danger, time pressure or making the requirements for actually completing one higher (must be done in safety and comfort, or only in certain designated "safe spots" in the map). Casters should be exhausting their spell slots by the end of a long rest, not just resting to get their 6+ slots back.
Of course this doesn't fix the entire problem, but its the very first thing anyone can do to start making it less of one.