Are you allowed to do a pit stop while drive through?

A pit stop cannot be completed whilst doing a drive through as it is a penalty.