It’s like trying to rub your belly and pat your head. The trick is that one should go on autopilot, without having to think about it. I suggest you try to drum the rhythm into your body until you don’t have to think about it anymore and your hands are moving without you having to think about it. This is muscle memory as well as feeling the rhythm in your body. It takes practice until the rhythm lives inside your body and can come out automatically.
Learning a rhythm is easy if you can speak it, if you can walk it, if you can clap it. Anything to help get it in your body. Then begin drumming and give yourself time to just feel the rhythm. Once you have felt it, then try a long tone or hum. Try singing a familiar melody. Try speaking. These will probably be hard at the beginning and throw your drumming off. Get back on the rhythm and try again.
Eventually, your hands will be able to do one thing while your mouth is doing other things. Here is a super fun video of me playing didgeridoo and djembe at the same time. Sometimes I am accentuating the rhythm I’m playing with my hands by repeating in my mouth. And other times two different rhythms are happening.
Pat pat rub rub.