You just have to hope, I suppose.
techgirl is right about the places with newer POS systems that would track it automatically, but for the old fashioned places there's no guarantee. I'd assume that if your server took the check from you after you wrote down the tip, he/she would be vigilant about making sure that he/she got the money owed.