Make sure she has a good walk before you go out, see if that improves the situation. Hope your not telling her off, because that doesn't help.
Just open the door let her out into the garden , make a fuss of her, leave her outside while you clean up. Don't make an issue about it.
Try going out for ten minutes, return home if she is clean , make a huge fuss, good girl etc. Make the the length of time longer each time. Always praise never punish even verbally. Hope this helps.