The solution is easy.
Dont count experience. Just count the number of encounters in order to level up. Example, each of the levels 5 thru 8 requires about 15 encounters in order to advance to the next level.
ALL rests = Short Rests.
All rests, regardless of length, yield the benefit of a Short Rest. Except, twice per level, a player can choose to make a rest give the benefit of a Long Rest instead. Narratively, this is a rally, feeling energy and hope and an ability to press on.
This rest variant should solve your difficulty.
Notice, the fifteen encounters can happen within two days − during a bloody dungeon delve − or else the fifteen encounters can span out across two years. The time frame doesnt matter. Whatever amount of time makes sense for the narrative is what matters.
Since there is about 15 encounters per level, this works out to be two Long Rests, with roughly 8 encounters between each rest. The math is the same.