How to account for the pandemic in time-series forecasting? This may be too broad a question, but I'm currently starting on a time-series model and was testing my potential variables for stationarity and found that a set of the predictors are stationary from 2008-2020 but a huge spike in the last two years makes them fail an adf test.
My question though is, when it comes to the actual modeling, what can be done to have the model still generalize well despite having a few years of hopefully a once-in-a-lifetime effect so recently? Besides just having a binary variable for "pandemic month" vs "non-pandemic month".

If your time series exhibits 'anomalous behavior' in more recent observations, you necessarily have to remove or at least 'adjust' the data. Otherwise, your model performance will suffer for future events that don't relate to the previous outlier interval.
In this thread Rob Hyndman gave following advice that appears to be straight forward - although there may be more/better alternatives:

For non-seasonal time series, outliers are replaced by linear
interpolation. For seasonal time series, the seasonal component from
the STL fit is removed and the seasonally adjusted series is linearly
interpolated to replace the outliers, before re-seasonalizing the
result.

STL refers to Seasonal and Trend Decomposition using LOESS.
Hope this helps towards solving your problem.
