Can someone help me ? Idk what to do

My daughter will turn 3 this month. I have been potty training her for awhile now. At the beginning it was hard since she wouldn’t let me know I would have to guess whenever she needed to pee. Now that she tells me it’s easier for me. The only problem is she will let us know ONLY when we’re home. But when we go out she pees herself or we have accidents I don’t understand why? If she lets both my husband and I know when we’re home? But once we step out of the house we have accidents? I’ll even remind her constantly if she needs to pee she will say no I’ll take her to the public bathrooms when we’re out but she won’t do nothing. Idk if it’s because she feels like she will fall ? Since the toilets are bigger she usually has a cushion for toddlers where she can sit without the feeling of falling ? Or idk what to do ? 😓😩