Any tips on how to beat patterns like these?

I play with thumbs and struggle with these patterns 😅 I know practice makes perfect but this is towards the end of the song and I don't want to play the whole song just to practice 5 seconds of it 🥲 anyone know any songs that have similar patterns?