Dealing with mental burnout from training

Lately I’ve been hitting the gym hard, but some days my mind just isn’t in it. I’m curious how others deal with that mental fog do you force yourself to stick to the plan, or do you listen to your body and take a break? I don’t want to lose momentum, but pushing through when I’m drained doesn’t feel productive either. What’s worked for you?