I can totally understand your question. I experienced the same thing when first learning to play guitar to accompany my singing.
I have met some folks who play the guitar very well but cannot combine singing and guitar playing and do both at the same time. Even professional musicians and famous performers often choose to leave the playing up to their band while concentrating on singing (either without their instrument, or often with acoustic guitar in hand mainly as a prop).
The issue is that both singing and playing guitar require concentration in their own right. When singing you must remember the nuances of how to vocalize the melody as well as remember the lyrics and timing. With guitar you have to remember the chords, get the fingers in the right place, establish and maintain the correct rhythm and tempo - and if you add anything more complex than basic strumming - like a hammer on lick or fill between chords - you really have to concentrate on the guitar part.
As you have probably already discovered, if you are playing a simple strum only arrangement of a song with basic chords and you know the lyrics well by heart, it's not so hard. Where things fall apart is when you don't have the lyrics memorized and must concentrate to remember them - or try to follow along with the lyrics on a music stand and/or when the guitar arrangement calls for something a little more complex (where you have to really focus on what you are doing).
The key to success in improving your ability to sing and play at the same time and manage to do a decent job on both parts - is to become extremely comfortable doing each part independently.
In other words, you might start by making sure you can sing the song in your sleep without really thinking about it. Sing to a karaoke track, sing a capella, or record the guitar part (preferably correctly played) separately and practice singing without reading the lyrics until it becomes automatic, second nature, no concentration required (like driving your car down your street).
Once you are super comfortable with your ability to sing the song without looking at the lyrics, and hitting all the right notes at the right time - do the same thing with the guitar part by itself. Learn to play the guitar arrangement fluidly without having to focus all your mental energy on getting it right. You want to memorize the chord progression and if there are some tricky parts, practice those by themselves until you can pull them off easily without mistakes.
Next play the guitar part while humming the melody to be sure you groove the timing of the singing with the guitar playing before you add the element of remembering the words. Finally start singing and playing at the same time.
If there are some complex timing issues on the guitar arrangement, it might help to play along on guitar with a recording of a professional performance of the song you are trying to learn. If the recording is in a different key than you plan to play in, use a capo to match the recording.
No matter how much I practice singing or playing or both at the same time, I have come to accept that if I do both at the same time, I won't be able to do either as flawlessly as if I did them by themselves. That's why when I write songs and make demos in my home studio, I will record the guitar part by itself and then go back and sing the lyrics without playing the guitar. I always get better results that way than when I am doing my rough sketch recording by playing guitar and singing at the same time.
Unfortunately there is no trick or shortcut that precludes a great deal of practice. But it does make it easier for me to learn the parts independently first before combining them. That way I can concentrate specifically on the part I am refining and mastering (vocal or guitar) until I get it running on autopilot in my brain.
The best "trick" I have learned is to play with a backing band and let the other musicians carry the music while I concentrate on singing and play a really dumbed down guitar arrangement. I leave the fancy guitar riffs and licks up to my lead guitarist who is a full time professional musician.
Good luck and keep it fun!