Trainer.fit() trains only on first task when different trainsets are passed each time

I am implementing a model for continual training. Hence, I train my model on different tasks and test them on previous tasks. In lightning versions 1.3x, trainer.fit() fits the models to only first set despite passing different trainset each time. When I check the accuracy on different tasks, it is maximum only on first task. When I shift to version 1.2.10, it trains expectedly on each trainset.