While they cannot pocket the tips, they can legally subtract the tips from the employee's hourly wage, even if that means going under the "minimum wage", which essentially amounts to the same thing as pocketing.
See https://www.dol.gov/whd/regs/compliance/whdfs15.htm
N.b. The employer is unable to do this if they don't know about the tip, which is why, as I understand it, tipping in cash is preferred by folks working in the service industry.