That's actually much longer than expected - https://learn.microsoft.com/en-us/training/support/faq?pivots=sandbox#how-long-does-the-sandbox-stay-around
The sandbox environment created for a module is available for four consecutive hours to ensure that you can finish the module. The Microsoft Learn exercises are meant to be finished in one sitting, in an hour or less.
Unfortunately there is no method to "recover it". Going forward, pls consider the limited duration of the sandbox availability
If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.
hth
Marcin