You should take care here. This is NOT an economy where you should be cavalier about your employer’s opinion of your behavior. Because it doesn’t matter whether YOU think it’s ok, it matters that your boss does not, and that your boss thinks you’re a prime offender. So, leave your phone out of the bathroom from now on. Period.
I might give it one shot to let the boss know that her comments disturbed you (with a focus on the fact that you really hope to keep this job). “I heard that you believe I have been avoiding work by taking extended bathroom breaks. This is upsetting because I enjoy my work here. Rather than just ignore it, I thought I’d check with you to see if there’s any work performance feedback you want to give me directly. I like the job and think I do well at it, but if there is something you need me to change, I prefer to know directly from you rather than the gossip mill.”
Yes, this will “out” your friend who told you what the boss said, but you can frame it as “Sally passed along your concern as a heads up that you weren’t happy with me, because she knows I like working here.” (Note: I deliberately sidestepped the phone-in-bathroom issue, because that’s not really what the boss is concerned about. She’s concerned that employees are hiding out in there, reading their phones rather than just taking a bathroom break and getting bback to work.)*
I don’t expect the boss to suddenly change her opinion, but you will at least have communicated that you want to keep your job and are willing to change behavior to do so. But in a small retail workplace, thye people promoted to manager are not necessarily very skilled at managing others, and ultimately there’s just not much you can do. If the work environment is intolerable, start looking for a new job pronto. Do not wait until you’re fired to start looking.
One hard-and-fast rule of professional life: when you really don’t like your employer, I guarantee you the feeling is mutual.
*the other reason I would not address or defend phone usage in the toilet is that food prep workers should not be bringing phones into the toilet, and then carrying those same phones around (thus negating the purpose of washing hands after using the bathroom). Regardless that people do it all the time, it’s not exactly a winning argument for anyone in the food prep industry