I struggled with this for many years, then it was like a light switch, it just "clicked" and I was able to do it from that moment on.
I suggest that you choose a song that you know very well, especially all the lyrics, and you know how the phrasing goes without having to think about about it.
I remember the first song I was able to sing and play at the same time - it was "Imagine" by John Lennon.
So if you have a song that you are able to play the chord progressions smoothly, and you know all the lyrics, just keep trying, and you'll get it!
I have also heard that some people try whistling the melody or humming the melody as they play before they can sing along.
All I can tell you is that for many many years I felt as though I would never be able to sing and play at the same time, and for many years I pretty much just gave up trying. This was when I was just a guitar player. Once I found the ukulele, I was determined to sing and play at the same time so I just kept at it.
Once it "clicked" though, it is SUPER easy for me now, and I can pretty much sing and play anything if I know how the song goes, and on guitar too.
Don't give up!