First let me just link this other, non-mega thread. It's highly relevant. Maybe it should be merged in, I dunno, but for anyone big on this Mega-thread's topic this other thread is worth reading.

Now then.

It is a general rule of gaming that if a player can do something without any in-game time passing, no game-world progression, then they should be able to do it without spending any real world time either. Both as a handy dandy QoL feature, and also because there's just no basis for players to not be able to do that instantly.
If you can stand there and manually stort your inventory for an hour without anything happening in game, no passage of time, then the game should just provide an autosort button that does it for you, instead of wasting your time.

So let's say we limit long resting to designated locations. Campsite (entrances) on the map.
If a player standing 10 feet from a highly dangerous cave boss but undetected can turn around, leave the cave, walk to the nearest fast travel point, teleport across the map, walk to the campsite, long rest, do that journey in reverse, then attack the boss after, with the rest of the world being in the same state as it was before they left, limiting camping to that location has had absolutely NO effect. It has done nothing. It has addressed zero problems. The game is in an identical state to how it was before that change. All of the issues causing people to ask for changes to how long resting works will still be in full effect. The only minimal effect is wasting a couple minutes of real time that shouldn't have been wasted.

So, if the player is able to do that, then they shouldn't have to. They should just be able to click a long rest button to do it instantly while standing next to that cave boss. And to be clear, when the player does that, they are not teleporting to camp, nor are they camping right there. They are making the whole long trip described above; the game is just letting you skip the "cutscene". So really, it shouldn't even effect your immersion. Either way the fact remains, location dependent long rests are in no way a solution to any of the problems, since it won't have any affect on them whatsoever.

Another idea discussed, equally as useless as location dependent camping, is adding a real time delay to doing another long rest. Once per hour, or once per in game day/night cycle (that doesn't actually progress time in any fashion) are both examples I've seen. Similar to how a player that wants to rest whenever they want can go back to camp with location based resting, a player can just let the game idle until the timer wears off for delayed resting. Rather than the round trip from and to that cave boss, they will just afk and go make dinner or play a game on their Switch or whatever while the timer ticks down so they can take the rest right next to that boss. The idea accomplishes nothing.

But something does need to be done about the long rest problem. As it stands, there is no point in Warlocks existing, since Wizards can use every single one of their spell slots every single fight. There are numerous other examples of why what we currently have is bad but I feel like that's the most glaring.
If you were to attack the goblin camp, instead of getting the ability to walk through peacfully, you would realisticly *have* to do it all in one day. I have not done this so I'm not sure how many separate combat bubbles that would split into but for the sake of discussion let's say the gaps in clusters are big enough to make it 4 seperate fights. I'm taking these coming numbers from DnD class pages so unless they changed in game a level 4 (level cap as of this posting) Warlock only gets 2 level 2 spell slots, and a Wizard gets 7 slots 3 of which are level 2. With our current abilty to long rest whenever we want the Wizard can cast 7 spells every fight for 28 total, 12 of which are at level 2. 28 spells for a set of fights that would have had to have been all in one day. And the Warlock only gets to cast 8 spells, losing not only in total count but in count of highest level as well, which is supposed to be their thing. Using short rests, my expectation would be to see that averaged out Warlocks and Wizards cast the same number of spells per fight, but instead we get the stated numbers. As far as I'm concerned this dynamic alone serves as absolute proof the current system requires changing. There are HUGE balance concerns here.

I'm low on time so I'm not about to type out a long winded attempt at solving the issue but the gist of it seems rather obvious to me: players should not be able to long rest whenever they want. And more imporantly, the restriction on when they can rest needs to be not a real-world restriction, but rather an game-world restriction. A restriction that requires the game world to actually progress in some manner before the player can rest again. A simple example would be needing to get through X amount of fights before the long rest function unlocks again, but I'm not actually proposing that as a solitary solution since not all days or fights are equal. Some days a party would indeed only do the one fight, and other days it's the four fight's of the goblin camp.