Messages.app / iMessage hijacking text messages
I think it is s matter of having wifi on at your Mac. Once it goes to sleep, wifi is off and you receive iMessages on your phone. Right now, the only thing I found that worked is either have your data on at all times on your phone or make sure your Mac is turned of when you leave.