I'm generally in agreement with Todd Wilcox's and Tim's answers, but maybe I can explain the same sort of idea in a different way.
I first started guitar as an after school class at 11 years old. Only 2 of us signed up so it was almost like a private lesson where we both paid attention and the teacher only had to explain things once. We learned basic chords and a handful of songs (chord charts with lyrics) and I think there was either a tab or sheet of the riff from Wipe Out.
After that I got a private teacher who let me choose what to work on, so I picked out songs that I wanted to learn (IIRC Phil Ochs' The Highwayman was one of these) and he'd learn them and then teach me. I'd learn just enough theory to make sense of what I was playing.
In high school I was briefly at a special public school (USA) for Performing Arts and got a classical guitar and a method book by Celedonio Romero (unfortunately out of print, but an excellent book that should be reprinted).
But as primarily a solo guitarist/singer, you can't just drop the rhythm or there'd be no song left. So any lead or single note lines have to be coordinated with the rhythm parts. Occasionally it's ok to stop the rhythm entirely for a little lead break, but often the single note lines need to be simplified or modified so you can keep the chords (or at least a bass line) going. Otherwise it doesn't sound like the song, you know?
A few sources of inspiration I've found for this sort of playing are early Elvis songs (often just one guitar and slap bass), Jimi Hendrix (especially when he's solo and can't let the bass player cover the changes), Cake (those stunning riffs all over the place, like scattered jewels!), White Stripes.
One rude awakening came to me when I was one of two guitarists in the college jazz ensemble. I was the "junior" guitarist, so I got the leftover songs, whatever new popped up. One such piece was going to be a James Brown style funk tune. And the director showed me a pattern he wanted me to play and I didn't write it down or pay it much attention. I thought this was my turn to just riff and fill and whatever. At the next rehearsal the director stopped the tune in the middle and asked me what I was playing. And I was completely unable to play the simple riff he had asked for at the previous rehearsal. I thought I was going to do "lead" but what the song actually demanded was rhythm. Now there might have been little spots where I could have added or accented something or other, but 90% of the job turned out to be doing the simple thing that was asked for.
One big hurdle that will need to be overcome in transitioning back to a "rhythm" mindset from a "lead" mindset is boredom. It's the same sequence of chords over and over. It's the same old rhythm over and over. It's the same old thing just over and over and over. And that's the trap. It's the wrong way to approach the task at hand.
As a rhythm guitar, your job is to help establish the rhythmic space or framework. Maybe the second verse is exactly the same chords as the first, but the emotion is different. Maybe shifting the strumming position will bring out that change in emotion, like moving from a sweeter tone near the neck to a more piercing tone near the bridge. Or shifting between full chords and partial chords. There's lots of ways to add subtle changes to keep alert and in the groove and carrying the song forward.
It can be really hard to play the same thing over and over and keep it consistent. Even if I had been able to play that funk riff correctly, it would have taken a Zen upgrade for me to play it consistently for 3 or 4 minutes. Part of the solution is to find pleasure in the simple act of playing a rhythm. Dial up your best djent tone and get some chug on.