@DianaGomez not sure if I can help, but have a few questions for @OllyLD that might help find the answer.
When the WhatsApp message comes through the inbox, is the phone number a visible property?
You mentioned your contact record already had a number attached, but others didn't - could you add a step to the workflow before the template sends to copy the number from the inbox message to the contact phone number property?
Could you create the template from the workflow as a snippet that you could use directly in the inbox?
I haven't used the WhatsApp integration yet - hopefully one of the others can help more!