Practise brief departures during the day, returning before your puppy becomes upset. Start with stepping behind a doorway
low-cost solutions for puppy training one or two seconds, then extend the time gradually; if barking starts, shorten the next attempt.