Your partner wants an apology.
“If I hurt you”
“But I didn’t mean to”
“And It wasn’t my fault”
Better to stop at sorry than to tag on an if, and or but. These make your apology about defending or excusing yourself, wiping the slate clean for your own sake rather than your partner’s.
Saying sorry isn't about dodging blame so I can feel better about myself. It's about expressing regret that I've hurt you so you can feel better about me.