Try to think less and listen (and feel) more. As long as you’re focused on the music, particularly the groove and the role you play in it, your muscle memory will find the right notes in a simple pattern like this.
First of all, try to experience the music from the perspective of a dancer, rather than that of an active listener. Repetitive music can be boring to listening to, but can be great for dancing to. So repetitive parts will make much more sense if you can imagine yourself dancing to them. Moving your body to music while playing may help here (I find that moving my neck to the beat really helps when I want to lock into a groove).
Also, attention can be trained. There are mindfulness and meditation exercises that are meant to help you gain control over your attention. You can apply these here too: try to actively notice when your mind is wandering off, and each time it does, consciously direct your attention back to the music (not to what your fingers are doing - your muscle memory will take care of that - but to the sound the band as whole is producing). Don’t judge yourself when you note that your mind has wandered off, that’s perfectly normal, and it will keep happening. But if you learn to notice in time when your mind is wandering off, you may be able to direct it back before you screw up. That’s the goal here.
Try to think of a song like this not as boring, but as a chance to really focus on the groove, since you don’t have to think about the notes. I actually like to play repetitive songs for this reason, but it does depend on the song, and especially on how good the rest of the band is. Note how each time you play the pattern, it’s slightly different, because it’s impossible to play it exactly the same twice, but also because the context changes. This will help in keeping you focused on the music.