On the offline evalution of recommender system
Sequential data (i.e. data that can be understood in sequences, such as time series) require apposite train-test splitting. When dealing with sequences, the split must be temporal as well.

It's the same principle that that must be followed when training language models, to make the most common example. This is well known in the literature.

I suggest you to find a timestep threshold in your data, and use that to split between train and test set.